Re: sql2008 diff sql2003 - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: sql2008 diff sql2003
Date
Msg-id 20080908170252.GE4411@alvh.no-ip.org
Whole thread Raw
In response to sql2008 diff sql2003  ("Pavel Stehule" <pavel.stehule@gmail.com>)
List 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
restrictingtherows of a result set is FETCH FIRST, rather than Microsoft SQLServer’s SELECT TOP N equivalent which SQL
Anywheresupportspresently. 
 

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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: For what should pg_stop_backup wait?
Next
From: Andrew Gierth
Date:
Subject: Re: sql2008 diff sql2003