Re: BUG #15198: nextval() accepts tables/indexes when adding adefault to a column
От | Alvaro Herrera |
---|---|
Тема | Re: BUG #15198: nextval() accepts tables/indexes when adding adefault to a column |
Дата | |
Msg-id | 20180517163631.cjphtsklcwhjdf6w@alvherre.pgsql обсуждение исходный текст |
Ответ на | Re: BUG #15198: nextval() accepts tables/indexes when adding adefault to a column (Andres Freund <andres@anarazel.de>) |
Ответы |
Re: BUG #15198: nextval() accepts tables/indexes when adding adefault to a column
|
Список | pgsql-bugs |
On 2018-May-17, Andres Freund wrote: > These alternatives seem like they're not an improvement. I don't think > it's worth doing anything here. I agree. If our nextval was less opaque, it'd be worth doing better. I mean something like CREATE TABLE tt ( col integer DEFAULT someseq.nextval ... ) which I think has been proposed over the years (and ultimately rejected; and even if implemented[1], this would not prevent our current syntax from being accepted). But we've stuck with the function-call syntax for better or worse. Let's live with it. [1] That syntax currently gets this funny error: alvherre=# create table ff (a int default seq.nextval); ERROR: missing FROM-clause entry for table "seq" -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-bugs по дате отправления: