Bug 2485 - SQL: default with expression
Summary: SQL: default with expression
Status: NEW
Alias: None
Product: SQL
Classification: Unclassified
Component: all (show other bugs)
Version: -- development
Hardware: x86 (i?86) Linux
: --- enhancement
Assignee: SQL devs
URL: http://sourceforge.net/support/tracke...
Depends on:
Reported: 2009-03-11 02:31 CET by Stefan de Konink
Modified: 2016-04-11 11:46 CEST (History)
1 user (show)


Note You need to log in before you can comment on or make changes to this bug.
Description Stefan de Konink 2009-03-11 14:31:28 CET
Upon inserting it would be nice to have a default value based on other columns in that same row.
Comment 1 Fabian Groffen 2009-12-01 10:10:38 CET
Why can't you write that using the current DEFAULT implementation?

Comment 2 Fabian Groffen 2009-12-01 10:35:03 CET
reopen for skinkie, as it seems he doesn't want to clarify otherwise
Comment 3 Stefan de Konink 2009-12-01 10:44:11 CET

Other database support 'dynamic' DEFAULTs. Hence you are allowed to place an expression into the default. This is currently not possible in MonetDB where it is static.

I don't see the big problem (performance) problem in this as long the default is added on the end of a bulk transaction. Instead of foreach record. S in general it would be an 'on-insert-update-trigger', opposed to the other request 'on-update-update-trigger'.
Comment 4 Fabian Groffen 2009-12-01 10:47:45 CET
as far as I know "DEFAULT NEXT VALUE FOR seq_X" is pretty dynamic
Comment 5 Pseudo user for Sourceforge import 2010-05-04 09:32:09 CEST
This bug was previously known as tracker item 2682714 at http://sourceforge.net/support/tracker.php?aid=2682714