Re: [SQL] Very strange 'now' behaviour in nested triggers.

2003-07-26 Thread Denis Zaitsev
On Sat, Jul 26, 2003 at 10:31:44AM -0400, Tom Lane wrote: > Denis Zaitsev <[EMAIL PROTECTED]> writes: > > create table xxx ( > > s text, > > t timestamp > > default 'now' > > ); > > That's a dangerous way to define the default --- 'now' is taken as a > literal of type timestamp, wh

Re: [SQL] Very strange 'now' behaviour in nested triggers.

2003-07-26 Thread Denis Zaitsev
On Sat, Jul 26, 2003 at 03:14:16PM +0100, Richard Huxton wrote: > On Saturday 26 July 2003 14:39, Denis Zaitsev wrote: > > In short, the idea this example is to test for is to split a > > comma-separated value of some text attribute (given to the INSERT > > operator) and then insert a row for each

Re: [SQL] Very strange 'now' behaviour in nested triggers.

2003-07-26 Thread Tom Lane
Denis Zaitsev <[EMAIL PROTECTED]> writes: > create table xxx ( > s text, > t timestamp > default 'now' > ); That's a dangerous way to define the default --- 'now' is taken as a literal of type timestamp, which means it will be reduced to a timestamp constant as soon as a statement

Re: [SQL] Very strange 'now' behaviour in nested triggers.

2003-07-26 Thread Richard Huxton
On Saturday 26 July 2003 14:39, Denis Zaitsev wrote: > In short, the idea this example is to test for is to split a > comma-separated value of some text attribute (given to the INSERT > operator) and then insert a row for each of the parts of that text > value. I've tried to do this thru a nested

[SQL] Very strange 'now' behaviour in nested triggers.

2003-07-26 Thread Denis Zaitsev
In short, the idea this example is to test for is to split a comma-separated value of some text attribute (given to the INSERT operator) and then insert a row for each of the parts of that text value. I've tried to do this thru a nested triggers approach. create table xxx ( s text, t tim