Quantcast
Viewing all articles
Browse latest Browse all 978

Forum Post: Column default gets evaluated on refresh

Maybe nuub error, but I find that (with postgresql backend) a table with column that has an expression for default the table view will not show the expression, but the current value. This is particularly annoying where the expression contains something like nextval('somesequence'), because at every view refresh the sequence is incremented. The same goes for a default like 'now()' which is not represented as the expression, but as the current value of the date/time An example table. this is the code preview just before clicking Finish on a table creation CREATE TABLE test.foo ( id INTEGER DEFAULT nextval ('permanentnumbers') NOT NULL, startdate TIMESTAMP (5) WITHOUT TIME ZONE DEFAULT now (), PRIMARY KEY (id) ) This table is created correctly, but the column view in TOAD shows numbers and dates instead of the expressions. And worse, on every refresh of this view the sequence 'permanentnumbers' is incremented. What am I doing wrong here? Or is this a shortcoming of the columns view?

Viewing all articles
Browse latest Browse all 978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>