From: | Michael Fuhr <mike(at)fuhr(dot)org> |
---|---|
To: | Hénoch Hervé <h(dot)henoch(at)isc84(dot)org> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #2224: unlogical syntax error |
Date: | 2006-01-31 20:37:30 |
Message-ID: | 20060131203730.GA77058@winnie.fuhr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
[Please copy the mailing list on replies.]
On Tue, Jan 31, 2006 at 08:53:44AM +0100, Hnoch Herv wrote:
> Thank for you response .... I have never written this query : I think it
> is JDBC that have generated it ... My query (written by me) is :
>
> select id_caisse as caisse from FROM adm_pat WHERE nip = '20020523'
>
> I know I have to use "as" statement ... I'd never disturb you for a
> simple syntax error ...
The above query does have a syntax error ("from FROM"), although
the query in your original report looked correct.
> Jdbc version : jdbc3 8.1.404
I downloaded postgresql-8.1-404.jdbc3.jar onto a Solaris 9 box
running PostgreSQL 8.1.2 and wrote a test program to run your
original query:
select id_caisse as caisse from adm_pat where nip = '20020523'
The query ran successfully and logged the following:
LOG: statement: PREPARE <unnamed> AS select id_caisse as caisse from adm_pat where nip = '20020523'
LOG: statement: <BIND>
LOG: statement: EXECUTE <unnamed> [PREPARE: select id_caisse as caisse from adm_pat where nip = '20020523']
> The very stange think is, if I write :
>
> select nip, id_caisse as caisse from FROM adm_pat WHERE nip = '20020523'
>
> There is no syntax error !!!!!
There should be a syntax error due to "from FROM"; please post the
actual queries you're running. It might also be helpful if you
could post a simple but complete program so we can see everything
you're doing. You might also try asking in the pgsql-jdbc list to
see if anybody there has heard of this problem.
--
Michael Fuhr
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2006-01-31 21:20:55 | Re: [BUGS] BUG #2195: log_min_messages crash server when in DEBUG3 to |
Previous Message | Tom Lane | 2006-01-31 20:26:03 | Re: [BUGS] BUG #2195: log_min_messages crash server when in DEBUG3 to |