Re: Sequence usage patch
От | Gavin Sherry |
---|---|
Тема | Re: Sequence usage patch |
Дата | |
Msg-id | Pine.LNX.4.21.0305271604500.24855-100000@linuxworld.com.au обсуждение исходный текст |
Ответ на | Re: Sequence usage patch (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-patches |
On Tue, 27 May 2003, Tom Lane wrote: > Rod Taylor <rbt@rbt.ca> writes: > > I don't see PREVIOUS as a reserved word, but CURRENT > > certainly is -- WHERE CURRENT OF for cursors, and several other places. > > > The attached patch makes CURRENT a reserved word. > > I do not think it will be necessary to treat CURRENT as a fully-reserved > word in order to support WHERE CURRENT OF, and accordingly I'm not very > happy with reserving it in order to support this ungainly, > not-yet-and-possibly-never-standard syntax. I still think that Oracle's > syntax is nicer, and by any sane estimate it is more of a real-world > standard than an unapproved 2000-something draft. I have an in development patch to add where current of. CURRENT needs only be added to the unreserved_keyword list. gram.y compiles fine and usage of current doesn't cause parse errors: template1=# create table abc (current text); CREATE TABLE template1=# insert into abc values('that'); INSERT 17079 1 template1=# insert into abc values('this'); INSERT 17080 1 template1=# begin; BEGIN template1=# declare blah cursor for select * from abc; DECLARE CURSOR template1=# fetch blah; current --------- that (1 row) template1=# update abc set current='that2' where current of blah; UPDATE 1 template1=# commit; Gavin
В списке pgsql-patches по дате отправления: