On 1/6/06, Bruce Momjian <pgman@candle.pha.pa.us> wrote: > Marko Kreen wrote: > > I found SQL2003 pdf's too ... from my reading it has only USAGE. > > > > 5WD-02-Foundation-2003-09.pdf: > > page 724 -> General Rules -> #2 > > page 740 -> Syntax rules -> #3 > > I admit I am terrible at understanding the standard, but I can't find > anything relevant on the page numbers you mentioned. Are those the > document pages or the page numbers displayed by the PDF viewer? What is > the section heading? I am using the same filename you have.
Those are print page numbers. (In case you have dead-tree variant :) And I got them here: http://www.wiscorp.com/SQLStandards.html Uh, and they are bit wrong. Ok here are they fully: 11.62 <sequence generator definition> General rules (page 727 printed/751 real) point #2 12.3 <privileges> Syntax rules (page 740 printed/764 real) point #3 > > Everything combined: > > SELECT: currval > > UPDATE: nextval > > USAGE: currval, nextval > > ALTER: setval > > > > Confusing? > > I see USAGE in the standard, but not ALTER. We don't support USAGE so I > am guessing our SELECT/UPDATE behavior is OK. No, we still want to separate setval from nextval. > Does this mean we should > only allow owners to do setval(), rather than binding it to INSERT? My first reaction is that it should be grantable, although I can't find any reasons for it, except backwards compatibility. How about this: SELECT: currval INSERT: nextval USAGE: currval, nextval UPDATE: setval -- marko ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster