Re: [HACKERS] PostgreSQL JDBC and sub-select

From: snpe <snpe(at)snpe(dot)co(dot)yu>
To: pgsql-hackers(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [HACKERS] PostgreSQL JDBC and sub-select
Date: 2002-11-10 14:51:56
Message-ID: 200211101451.56836.snpe@snpe.co.yu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-jdbc

On Sunday 10 November 2002 05:27 am, Tom Lane wrote:
> snpe <snpe(at)snpe(dot)co(dot)yu> writes:
> > I work with JDeveloper and PostgreSQL JDBC and I have one problem.
> > I get error :
> > sub-SELECT in FORM must have an alias
> >
> > Is it SQL standard (must have alias) or PostgreSQL specific ?
>
> The SQL standard says you must write an alias. A FROM item is a <table
> reference> (SQL92 section 7.4), which is defined (in SQL92 6.3) as
>
> <table reference> ::=
> <table name> [ [ AS ] <correlation name>
> [ <left paren> <derived column list> <right paren> ] ]
>
> | <derived table> [ AS ] <correlation name>
>
> [ <left paren> <derived column list> <right paren> ]
>
> | <joined table>
>
> where
>
> <derived table> ::= <table subquery>
>
> The square brackets show that an alias (<correlation name>) is optional
> for a plain table name, but is required for a sub-SELECT (<derived
> table>).
>
> This is not just a random whim on the part of the SQL spec writers.
> One reason why they did it that way is to ensure that some specific
> <correlation name> can be associated with every column produced by a
> FROM clause. I used to remember some other interesting consequences,
> but it's too late on a Saturday night to recall all the details...
>
> > I can't change SQL command, but it is internal JDeveloper command
>
> I have zero sympathy for "please change Postgres because my application
> cannot be bothered to comply with the SQL specification".

I didn't say that.I asked if that is PostgreSQL specific.Thanks for answer.

regards
Haris Peco

In response to

Browse pgsql-general by date

  From Date Subject
Next Message snpe 2002-11-10 14:52:58 Re: [HACKERS] PostgreSQL JDBC and sub-select
Previous Message Nick Fankhauser 2002-11-10 14:37:44 Re: [JDBC] [HACKERS] PostgreSQL JDBC and sub-select

Browse pgsql-hackers by date

  From Date Subject
Next Message snpe 2002-11-10 14:52:58 Re: [HACKERS] PostgreSQL JDBC and sub-select
Previous Message Tom Lane 2002-11-10 14:44:21 Re: The database system is in recovery mode

Browse pgsql-jdbc by date

  From Date Subject
Next Message snpe 2002-11-10 14:52:58 Re: [HACKERS] PostgreSQL JDBC and sub-select
Previous Message Nick Fankhauser 2002-11-10 14:37:44 Re: [JDBC] [HACKERS] PostgreSQL JDBC and sub-select