Skip site navigation (1) Skip section navigation (2)

Re: Rewriting select statements

From: David Fetter <david(at)fetter(dot)org>
To: Phil Cairns <phil(at)pagaros(dot)com(dot)au>
Cc: 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: Rewriting select statements
Date: 2009-10-31 06:06:17
Message-ID: 20091031060617.GC28990@fetter.org (view raw or flat)
Thread:
Lists: pgsql-general
On Sat, Oct 31, 2009 at 08:57:03AM +1100, Phil Cairns wrote:
> Tom Lane wrote:
> > "Phil Cairns" <phil(at)pagaros(dot)com(dot)au> writes:
> > > I want to have the server do this: If the query has no where
> > > clause, use a where clause of "where 1=0".
> > 
> > > Is this possible?
> > 
> > It's doubtless *possible*, but if you're asking for it to actually
> > happen in any supported version of Postgres, the answer is no way.
> > It's directly contrary to the SQL standard.
> 
> Yeah. Not asking for a feature to be added, just asking if something
> already existed, some sort of rule that could be created that would
> rewrite the query.
> 
> > > Why would I want to do this? Because a third party library
> > > (ArcGIS) has a "feature" such that when a relation name is
> > > registered with it, it does a "select * from <relation>" and
> > > then does nothing with the results.
> > 
> > Tell the library authors to fix their broken code.  This is
> > blithering stupidity in *any* SQL database, not only Postgres.
> 
> Tried that, and got no response.

Name and shame the people who failed to respond.  Heck, you can do it
right here.  Included their contact info, curriculum vitæ of everyone
you can find who's involved with this horrific bug, etc., etc.  You
can start here :)

http://www.esri.com/company/contact.html

Make sure *everybody* knows that the bug is in the ArcGIS software.
Make sure they let ESRI know loudly, publicly and frequently that the
problem is on ESRI's end.

> I fully agree that it's broken, but my users just see the delay.  I
> might have to try some sort of proxy arrangement.

This is not your problem.  Treating it as though it were your problem
will only lead to enormous pain to you, and will not actually solve
the problem.

Cheers,
David.
-- 
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david(dot)fetter(at)gmail(dot)com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Responses

pgsql-general by date

Next:From: Guillaume LelargeDate: 2009-10-31 06:46:48
Subject: Re: pg_start_backup question
Previous:From: Denis FeklushkinDate: 2009-10-31 05:50:10
Subject: Re: What order of steps of the postgres when you change information in the table?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group