pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Rod Taylor <pg@rbt.ca>
To: Greg Stark <gsstark@mit.edu>
Cc: pgsql-sql@postgresql.org
Subject: Re: SQL challenge--top 10 for each key value?
Date: Sat, 10 Apr 2004 08:51:14 -0700
Message-ID: <200404100851.14683.josh@agliodbs.com> (raw)
In-Reply-To: <1081560594.56361.818.camel@jester>
References: <33af4fa4e4ec230574cefcff737ea40a@news.teranews.com>
	<87ad1kg4c2.fsf@stark.xeocode.com>
	<1081560594.56361.818.camel@jester>

Rod, Greg

> It's not really like Oracles row num at all, though I suppose you can
> emulate rownum using it. The intention is that you will use it for
> "aggregates" like running totals, moving averages, counting, etc.

Yes, that makes a certain amount of sense.  I just take exception to the name 
"Row Number" becuase it confuses newbies about the actual nature of the data 
being returned and gets them back in the bad space of believing in fixed data 
ordering -- something which RDBMSes are supposed to avoid.

I'm also disgusted at the vendor partiality that this shows.  PostgreSQL and 
MySQL both have working implementations of a very similar concept using the 
non-confusing term "Limit".   However, since Oracle is on the committee, they 
had to use a more "Oracle-friendly" term, I guess.

> In the case of SQL was there ever any pretension otherwise? Was the SQL
> standard ever really useful as a "real standard"? I can write useful ANSI
> C89 code that will compile and work on any C compiler. Trying to write
> portable SQL92 code that does any useful work is about as productive as
> stapling bagels to your forehead.

Well, there *was* a pretense otherwise, which ended about 1994, just as we 
were getting SQL on this project.  Now the big vendors -- mostly IBM and 
Oracle since Informix and Sybase are dying -- run everything and adapt the 
standard to what features their products already have.

So, yes, SQL92 needed development and expansion.   But we didn't need SQL99.

-- 
Josh Berkus
Aglio Database Solutions
San Francisco



view thread (16+ messages)  latest in thread

Message-ID: <200404100851.14683.josh@agliodbs.com>
Permalink:  ../200404100851.14683.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200404100851.14683.josh@agliodbs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: josh@agliodbs.com, pg@rbt.ca, gsstark@mit.edu
  Subject: Re: SQL challenge--top 10 for each key value?
  In-Reply-To: <200404100851.14683.josh@agliodbs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox