Re: Bug?: Text after right paren in query is ignored

Lists: pgsql-bugs
From: Steve Peterson <steve(at)zpfe(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Bug?: Text after right paren in query is ignored
Date: 2005-09-30 03:04:04
Message-ID: 6.2.3.4.0.20050929220117.01ed5ed8@209.98.88.108
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Is this a bug or some artifact of the SQL language that I've never
seen before?

SELECT v_id
FROM table
WHERE col = 'V')
AND blah

executes without errors, ignoring the closing paren and everything thereafter.

Platform: PostgreSQL 8.0.3 on Intel / Windows XP


From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Steve Peterson <steve(at)zpfe(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug?: Text after right paren in query is ignored
Date: 2005-09-30 14:58:40
Message-ID: 20050930145840.GA7891@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On Thu, Sep 29, 2005 at 10:04:04PM -0500, Steve Peterson wrote:
> Is this a bug or some artifact of the SQL language that I've never
> seen before?
>
> SELECT v_id
> FROM table
> WHERE col = 'V')
> AND blah
>
> executes without errors, ignoring the closing paren and everything
> thereafter.

Not here. How are you executing that query, exactly?

--
Alvaro Herrera Valdivia, Chile ICBM: S 39º 49' 17.7", W 73º 14' 26.8"
"Some men are heterosexual, and some are bisexual, and some
men don't think about sex at all... they become lawyers" (Woody Allen)


From: Steve Peterson <steve(at)zpfe(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug?: Text after right paren in query is ignored
Date: 2005-10-01 03:37:05
Message-ID: 6.2.3.4.0.20050930222624.07fed3e0@209.98.88.108
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

The query is submitted using the JDBC driver, via
the SQLExplorer plugin for Eclipse.

Is there a way for me to see the query as it was
submitted to the backend? If so I'll take a look and see what it looks like.

S

At 09:58 AM 9/30/2005, Alvaro Herrera wrote:
>On Thu, Sep 29, 2005 at 10:04:04PM -0500, Steve Peterson wrote:
> > Is this a bug or some artifact of the SQL language that I've never
> > seen before?
> >
> > SELECT v_id
> > FROM table
> > WHERE col = 'V')
> > AND blah
> >
> > executes without errors, ignoring the closing paren and everything
> > thereafter.
>
>Not here. How are you executing that query, exactly?
>
>--
>Alvaro Herrera Valdivia, Chile ICBM: S 39 49' 17.7", W 73 14' 26.8"
>"Some men are heterosexual, and some are bisexual, and some
>men don't think about sex at all... they become lawyers" (Woody Allen)


From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Steve Peterson <steve(at)zpfe(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug?: Text after right paren in query is ignored
Date: 2005-10-04 12:52:21
Message-ID: 20051004125221.GA5190@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On Fri, Sep 30, 2005 at 10:37:05PM -0500, Steve Peterson wrote:
> The query is submitted using the JDBC driver, via
> the SQLExplorer plugin for Eclipse.
>
> Is there a way for me to see the query as it was
> submitted to the backend? If so I'll take a look and see what it looks
> like.

Sure. Use the log_statement configuration parameter in postgresql.conf.

--
Alvaro Herrera Architect, http://www.EnterpriseDB.com
Thou shalt study thy libraries and strive not to reinvent them without
cause, that thy code may be short and readable and thy days pleasant
and productive. (7th Commandment for C Programmers)


From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Steve Peterson <steve(at)zpfe(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug?: Text after right paren in query is ignored
Date: 2005-10-04 21:32:55
Message-ID: 4342F507.7050901@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Alvaro Herrera wrote:
> On Fri, Sep 30, 2005 at 10:37:05PM -0500, Steve Peterson wrote:
>
>>The query is submitted using the JDBC driver, via
>>the SQLExplorer plugin for Eclipse.
>>
>>Is there a way for me to see the query as it was
>>submitted to the backend? If so I'll take a look and see what it looks
>>like.
>
>
> Sure. Use the log_statement configuration parameter in postgresql.conf.

This won't log anything with recent JDBC drivers and pre-8.1 backends.

-O


From: Steve Peterson <stevep(at)zpfe(dot)com>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Steve Peterson <steve(at)zpfe(dot)com>, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Bug?: Text after right paren in query is ignored
Date: 2005-10-04 22:07:18
Message-ID: 20051004170645.S37255-100000@magpie.zpfe.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Any known way to log at the JDBC level? When I get a little time I'm
going to write a test that bypasses Eclipse and SQLExplorer.

On Wed, 5 Oct 2005, Oliver Jowett wrote:

> Alvaro Herrera wrote:
> > On Fri, Sep 30, 2005 at 10:37:05PM -0500, Steve Peterson wrote:
> >
> >>The query is submitted using the JDBC driver, via
> >>the SQLExplorer plugin for Eclipse.
> >>
> >>Is there a way for me to see the query as it was
> >>submitted to the backend? If so I'll take a look and see what it looks
> >>like.
> >
> >
> > Sure. Use the log_statement configuration parameter in postgresql.conf.
>
> This won't log anything with recent JDBC drivers and pre-8.1 backends.
>
> -O
>


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Steve Peterson <stevep(at)zpfe(dot)com>
Cc: Oliver Jowett <oliver(at)opencloud(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Steve Peterson <steve(at)zpfe(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug?: Text after right paren in query is ignored
Date: 2005-10-05 11:52:46
Message-ID: 200510051152.j95Bqk804051@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Steve Peterson wrote:
> Any known way to log at the JDBC level? When I get a little time I'm
> going to write a test that bypasses Eclipse and SQLExplorer.
>
> On Wed, 5 Oct 2005, Oliver Jowett wrote:
>
> > Alvaro Herrera wrote:
> > > On Fri, Sep 30, 2005 at 10:37:05PM -0500, Steve Peterson wrote:
> > >
> > >>The query is submitted using the JDBC driver, via
> > >>the SQLExplorer plugin for Eclipse.
> > >>
> > >>Is there a way for me to see the query as it was
> > >>submitted to the backend? If so I'll take a look and see what it looks
> > >>like.
> > >
> > >
> > > Sure. Use the log_statement configuration parameter in postgresql.conf.
> >
> > This won't log anything with recent JDBC drivers and pre-8.1 backends.

This will be fixed in 8.1.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Steve Peterson <stevep(at)zpfe(dot)com>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug?: Text after right paren in query is ignored
Date: 2005-10-05 22:40:38
Message-ID: 43445666.5060700@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Steve Peterson wrote:
> Any known way to log at the JDBC level? When I get a little time I'm
> going to write a test that bypasses Eclipse and SQLExplorer.

Pass 'logLevel=2' as a URL parameter in the JDBC URL; that will log all
protocol-level messages sent and received, including the query text.

-O