Re: sql2008 diff sql2003

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: sql2008 diff sql2003
Date: 2008-09-08 17:02:52
Message-ID: 20080908170252.GE4411@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule escribió:
> Hello
>
> I found one usefull article
> http://iablog.sybase.com/paulley/2008/07/sql2008-now-an-approved-iso-international-standard/

Wow, this is really horrid:

# F856 through F859: FETCH FIRST clause in subqueries, views,
and query expressions. The SQL:2008 syntax for restricting the
rows of a result set is FETCH FIRST, rather than Microsoft SQL
Server’s SELECT TOP N equivalent which SQL Anywhere supports
presently.

This means we have to support stuff like

declare foo cursor for select * from lists;
select * from (fetch first from foo) as bar;

(I wonder why didn't they use FETCH NEXT instead. As is, it seems a bit
cumbersome to use.)

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Gierth 2008-09-08 17:08:55 Re: Common Table Expressions (WITH RECURSIVE) patch
Previous Message Tom Lane 2008-09-08 16:44:38 Re: For what should pg_stop_backup wait?