Re: [JDBC] PostgreSQL JDBC and sub-select - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: [JDBC] PostgreSQL JDBC and sub-select
Date
Msg-id GNELIHDDFBOCMGBFGEFOEEJICEAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to Re: [JDBC] PostgreSQL JDBC and sub-select  (snpe <snpe@snpe.co.yu>)
List pgsql-hackers
> On Sunday 10 November 2002 08:51 am, Hannu Krosing wrote:
> > snpe kirjutas L, 09.11.2002 kell 22:51:
> > > Hello,
> > >   I work with JDeveloper and PostgreSQL  JDBC and I have one problem.
> > > I get error :
> > >   sub-SELECT in FORM must have an alias
> > > I can't change SQL command, but it is internal JDeveloper command
> >
> > You could set up query logging in the backend and see what the offending
> > query is. It may still be something you did (a missing or extra
> > something somewhere).
> >
>
> query is like this :
> select * from (select * from tab) where 1=2
>
> This is work with Oracle,DB2,SQL Server
> Postgresql request alias in sub-select in from clause

The SQL standard requires that you alias it.  Postgres follows the standard
on this:

select * from (select * from tab) as sub where 1=2;

Chris



pgsql-hackers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: Propose RC1 for Friday ...
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: FOR EACH STATEMENT triggers