[HACKERS] SQL:2008 CURRENT_CATALOG and CURRENT_SCHEMA

2008-10-22 Thread Peter Eisentraut
Here is another patch for relatively redundant SQL:2008 functionality. They standardized in CURRENT_CATALOG and CURRENT_SCHEMA (without parentheses, as usual) for what we have as current_database() and current_schema(). They also added SET CATALOG and SET SCHEMA. SET CATALOG won't work in Pos

Re: [HACKERS] SQL:2008 LIMIT/OFFSET

2008-10-20 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> BTW, I think it's a bad idea to assign made-up parse locations, as >> you did here: > Hmm, @$ is the location of the complete rule, so it should point to the > "empty" spot in theory. Or am I misunderstanding something? Well, yeah

Re: [HACKERS] SQL:2008 LIMIT/OFFSET

2008-10-20 Thread Peter Eisentraut
Tom Lane wrote: Peter Eisentraut <[EMAIL PROTECTED]> writes: SQL:2008 specifies the following syntax for what we have so far called LIMIT and OFFSET SELECT ... [ ORDER BY ... ] OFFSET num {ROW|ROWS} FETCH {FIRST|NEXT} [num] {ROW|ROWS} ONLY What does the "NEXT" option mean? FIRST and NE

Re: [HACKERS] SQL:2008 LIMIT/OFFSET

2008-10-20 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > SQL:2008 specifies the following syntax for what we have so far called > LIMIT and OFFSET > SELECT ... [ ORDER BY ... ] > OFFSET num {ROW|ROWS} FETCH {FIRST|NEXT} [num] {ROW|ROWS} ONLY What does the "NEXT" option mean? I'm a bit worried that th

[HACKERS] SQL:2008 LIMIT/OFFSET

2008-10-20 Thread Peter Eisentraut
SQL:2008 specifies the following syntax for what we have so far called LIMIT and OFFSET SELECT ... [ ORDER BY ... ] OFFSET num {ROW|ROWS} FETCH {FIRST|NEXT} [num] {ROW|ROWS} ONLY For example, SELECT id, name FROM tab1 ORDER BY id OFFSET 20 ROWS FETCH NEXT 10 ROWS ONLY; (I understand thi

[HACKERS] SQL:2008 (some correction)

2007-11-28 Thread Тюрин Дмитрий
I ask you to implement ideas, stated in http://sql2008.euro.ru/sql2008.ppt (description is in http://sql2008.euro.ru/zip/sql2008-allfiles.zip) in Postgres. I'm ready to aswer to any your questions. Dmitry Turin ---(end of broadcast)--- TIP 1: if p

[HACKERS] SQL:2008

2007-11-28 Thread Тюрин Дмитрий
I ask you to implement ideas, stated in http://sql2008.euro.ru/sql2008.ppt (description is in http://sql2008.euro.ru/zip/sql2008-allfiles.zip) in MySql. I'm ready to aswer to any your questions. Dmitry Turin ---(end of broadcast)--- TIP 6: explain