pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #6727: Column does not exist exception has no error code
5+ messages / 4 participants
[nested] [flat]

* BUG #6727: Column does not exist exception has no error code
@ 2012-07-11 15:08 tuckerpmt@gmail.com
  2012-07-11 17:43 ` Re: BUG #6727: Column does not exist exception has no error code Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 5+ messages in thread

From: tuckerpmt@gmail.com @ 2012-07-11 15:08 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      6727
Logged by:          Patrick Tucker
Email address:      tuckerpmt@gmail.com
PostgreSQL version: 9.1.1
Operating system:   Windows
Description:        

The SQLException that is thrown when performing a query that has a column
name that is not valid, does not exist, does not contain an error code.  We
are forced to do a string comparison to figure out if a particular exception
is caused by an invalid column name.  This is not ideal.  A fix would be
greatly appreciated.

Thanks,
Pat




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: BUG #6727: Column does not exist exception has no error code
  2012-07-11 15:08 BUG #6727: Column does not exist exception has no error code tuckerpmt@gmail.com
@ 2012-07-11 17:43 ` Tom Lane <tgl@sss.pgh.pa.us>
  2012-07-11 18:10   ` Re: BUG #6727: Column does not exist exception has no error code Patrick Tucker <tuckerpmt@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Tom Lane @ 2012-07-11 17:43 UTC (permalink / raw)
  To: tuckerpmt@gmail.com; +Cc: pgsql-bugs

tuckerpmt@gmail.com writes:
> The SQLException that is thrown when performing a query that has a column
> name that is not valid, does not exist, does not contain an error
> code.

Could you provide a specific example?  When I try this I see an error
code, 42703:

regression=# \set VERBOSITY verbose
regression=# select nosuchcol from int8_tbl;
ERROR:  42703: column "nosuchcol" does not exist
LINE 1: select nosuchcol from int8_tbl;
               ^
LOCATION:  transformColumnRef, parse_expr.c:766

There may indeed be someplace where the errcode was forgotten, but
without a concrete example it's hard to find where.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: BUG #6727: Column does not exist exception has no error code
  2012-07-11 15:08 BUG #6727: Column does not exist exception has no error code tuckerpmt@gmail.com
  2012-07-11 17:43 ` Re: BUG #6727: Column does not exist exception has no error code Tom Lane <tgl@sss.pgh.pa.us>
@ 2012-07-11 18:10   ` Patrick Tucker <tuckerpmt@gmail.com>
  2012-07-11 18:24     ` Re: BUG #6727: Column does not exist exception has no error code Patrick Tucker <tuckerpmt@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Patrick Tucker @ 2012-07-11 18:10 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs

Interesting, the test case that I ran was performing a simple SQL statement
like the following: select "a" from table

I wonder if the version of the driver I am using needs to be updated or
even the database?
Thanks,
Pat
On Wed, Jul 11, 2012 at 1:43 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> tuckerpmt@gmail.com writes:
> > The SQLException that is thrown when performing a query that has a column
> > name that is not valid, does not exist, does not contain an error
> > code.
>
> Could you provide a specific example?  When I try this I see an error
> code, 42703:
>
> regression=# \set VERBOSITY verbose
> regression=# select nosuchcol from int8_tbl;
> ERROR:  42703: column "nosuchcol" does not exist
> LINE 1: select nosuchcol from int8_tbl;
>                ^
> LOCATION:  transformColumnRef, parse_expr.c:766
>
> There may indeed be someplace where the errcode was forgotten, but
> without a concrete example it's hard to find where.
>
>                         regards, tom lane
>

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: BUG #6727: Column does not exist exception has no error code
  2012-07-11 15:08 BUG #6727: Column does not exist exception has no error code tuckerpmt@gmail.com
  2012-07-11 17:43 ` Re: BUG #6727: Column does not exist exception has no error code Tom Lane <tgl@sss.pgh.pa.us>
  2012-07-11 18:10   ` Re: BUG #6727: Column does not exist exception has no error code Patrick Tucker <tuckerpmt@gmail.com>
@ 2012-07-11 18:24     ` Patrick Tucker <tuckerpmt@gmail.com>
  2012-07-12 00:20       ` Re: BUG #6727: Column does not exist exception has no error code Craig Ringer <ringerc@ringerc.id.au>
  0 siblings, 1 reply; 5+ messages in thread

From: Patrick Tucker @ 2012-07-11 18:24 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs

BTW I'm using postgresql-9.1-901.jdbc4.jar
Thanks again,
Pat

On Wed, Jul 11, 2012 at 2:10 PM, Patrick Tucker <tuckerpmt@gmail.com> wrote:

> Interesting, the test case that I ran was performing a simple SQL
> statement like the following: select "a" from table
>
> I wonder if the version of the driver I am using needs to be updated or
> even the database?
> Thanks,
> Pat
> On Wed, Jul 11, 2012 at 1:43 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
>> tuckerpmt@gmail.com writes:
>> > The SQLException that is thrown when performing a query that has a
>> column
>> > name that is not valid, does not exist, does not contain an error
>> > code.
>>
>> Could you provide a specific example?  When I try this I see an error
>> code, 42703:
>>
>> regression=# \set VERBOSITY verbose
>> regression=# select nosuchcol from int8_tbl;
>> ERROR:  42703: column "nosuchcol" does not exist
>> LINE 1: select nosuchcol from int8_tbl;
>>                ^
>> LOCATION:  transformColumnRef, parse_expr.c:766
>>
>> There may indeed be someplace where the errcode was forgotten, but
>> without a concrete example it's hard to find where.
>>
>>                         regards, tom lane
>
>

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: BUG #6727: Column does not exist exception has no error code
  2012-07-11 15:08 BUG #6727: Column does not exist exception has no error code tuckerpmt@gmail.com
  2012-07-11 17:43 ` Re: BUG #6727: Column does not exist exception has no error code Tom Lane <tgl@sss.pgh.pa.us>
  2012-07-11 18:10   ` Re: BUG #6727: Column does not exist exception has no error code Patrick Tucker <tuckerpmt@gmail.com>
  2012-07-11 18:24     ` Re: BUG #6727: Column does not exist exception has no error code Patrick Tucker <tuckerpmt@gmail.com>
@ 2012-07-12 00:20       ` Craig Ringer <ringerc@ringerc.id.au>
  0 siblings, 0 replies; 5+ messages in thread

From: Craig Ringer @ 2012-07-12 00:20 UTC (permalink / raw)
  To: Patrick Tucker <tuckerpmt@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-bugs

On 07/12/2012 02:24 AM, Patrick Tucker wrote:
> BTW I'm using postgresql-9.1-901.jdbc4.jar
> Thanks again,

A self-contained test case - a small Java program that connects to a 
test DB, runs a query, and reports the result vs what you expected the 
result to be - would be helpful.

--
Craig ringer

^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2012-07-12 00:20 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-07-11 15:08 BUG #6727: Column does not exist exception has no error code tuckerpmt@gmail.com
2012-07-11 17:43 ` Tom Lane <tgl@sss.pgh.pa.us>
2012-07-11 18:10   ` Patrick Tucker <tuckerpmt@gmail.com>
2012-07-11 18:24     ` Patrick Tucker <tuckerpmt@gmail.com>
2012-07-12 00:20       ` Craig Ringer <ringerc@ringerc.id.au>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox