Hi,
I tried to use a construction like:
CREATE TABLE LOG (
F1 VARCHAR(100),
TRANS_ID integer default current_transaction,
USER_ID varchar(10) default current_user,
USER_IP varchar(15) default RDB$GET_CONTEXT('SYSTEM', 'CLIENT_ADDRESS')
,
DATETIME timestamp default current_timestamp
);
But it seems that Context variables as default value are not allowed.
I took a look at parse.y and changed it to:
default_value
: constant
| RDB_GET_CONTEXT '(' value_list_opt ')'
{ $$ = makeClassNode(newNode<SysFuncCallNode>(toName($1), $3));
}
| current_user { $$ =
makeClassNode($1); }
...
Now it's allowed, but could this lead to problems - except for typo's in the
quoted parts of RDB$GET_CONTEXT()?
Kind regards,
Bert
--
View this message in context:
http://firebird.1100200.n4.nabble.com/Context-variables-as-default-value-tp3565910p3565910.html
Sent from the firebird-devel mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel