From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Tim Ellis <Tim(dot)Ellis(at)gamet(dot)com> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Triggers... Questions... Yes. |
Date: | 2002-06-13 21:50:39 |
Message-ID: | 173.1024005039@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Tim Ellis <Tim(dot)Ellis(at)gamet(dot)com> writes:
> Yeh. Good question. I would assume their generator MEANT
> (max(autonum,0)+1) supposing that a "ANSI Level 2"-compliant server's
> max function might return the second value if the first is NULL. But no
> matter how you slice it, that looks syntactically wrong.
I suspected they meant COALESCE(max(autonum),0) + 1, which would be
correct since max() on no values is defined to produce NULL. I'm
not aware of any variant of max() that takes two arguments.
> Perhaps. Is the sequence object part of standard SQL? I know Postgres and
> Oracle have it (among others) but I also know of at least one major
> recent-version RDBMS that fails to have a sequence object.
It is not standard. On the other hand, expecting people to have
implemented every last frammish in SQL99 is a bit premature also...
SQL92 didn't have triggers at all.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-06-14 03:22:33 | Re: Indexes on separate disk ? |
Previous Message | Tim Ellis | 2002-06-13 21:32:13 | Re: Triggers... Questions... Yes. |