pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feed8.4 versus 8.2 against nonexistent column "name" ...
2+ messages / 2 participants
[nested] [flat]
* 8.4 versus 8.2 against nonexistent column "name" ...
@ 2010-03-17 14:16 James Robinson <jlrobins@socialserve.com>
2010-03-17 14:48 ` Re: 8.4 versus 8.2 against nonexistent column "name" ... Osvaldo Kussama <osvaldo.kussama@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: James Robinson @ 2010-03-17 14:16 UTC (permalink / raw)
To: pgsql-sql
Can anyone shine a light on why 8.4 behaves surprisingly when being
queried for a bogus column "name", but only using qualified table/
column references.
Here's a sample script:
-----
create table foo
(
id int,
x int
);
insert into foo(id, x)
values
(1, 23),
(2, 43),
(4, 45);
-- Fails on both -- no column named 'name'
select name from foo;
-- Fails on 8.2, still no 'name' column, but 8.4 succeeds returning
whole rows.
select f.name from foo f;
----
On 8.2.11, both selects fail:
CREATE TABLE
INSERT 0 3
ERROR: column "name" does not exist
LINE 1: select name from foo;
^
ERROR: column f.name does not exist
LINE 1: select f.name from foo f;
^
On 8.4.2, the first select fails, but the second succeeds, returning
whole rows wrapped up like tuples:
CREATE TABLE
INSERT 0 3
ERROR: column "name" does not exist
LINE 1: select name from foo;
^
name
--------
(1,23)
(2,43)
(4,45)
(3 rows)
A quick skim through the 8.3. and 8.4. release notes found nothing
interesting related to 'name'.
Thanks!
----
James Robinson
Socialserve.com
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: 8.4 versus 8.2 against nonexistent column "name" ...
2010-03-17 14:16 8.4 versus 8.2 against nonexistent column "name" ... James Robinson <jlrobins@socialserve.com>
@ 2010-03-17 14:48 ` Osvaldo Kussama <osvaldo.kussama@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Osvaldo Kussama @ 2010-03-17 14:48 UTC (permalink / raw)
To: James Robinson <jlrobins@socialserve.com>; +Cc: pgsql-sql
2010/3/17 James Robinson <jlrobins@socialserve.com>:
> Can anyone shine a light on why 8.4 behaves surprisingly when being queried
> for a bogus column "name", but only using qualified table/column references.
>
> Here's a sample script:
>
> -----
> create table foo
> (
> id int,
> x int
> );
>
> insert into foo(id, x)
> values
> (1, 23),
> (2, 43),
> (4, 45);
>
> -- Fails on both -- no column named 'name'
> select name from foo;
>
> -- Fails on 8.2, still no 'name' column, but 8.4 succeeds returning whole
> rows.
> select f.name from foo f;
> ----
>
> On 8.2.11, both selects fail:
>
> CREATE TABLE
> INSERT 0 3
> ERROR: column "name" does not exist
> LINE 1: select name from foo;
> ^
> ERROR: column f.name does not exist
> LINE 1: select f.name from foo f;
> ^
>
>
> On 8.4.2, the first select fails, but the second succeeds, returning whole
> rows wrapped up like tuples:
>
> CREATE TABLE
> INSERT 0 3
> ERROR: column "name" does not exist
> LINE 1: select name from foo;
> ^
> name
> --------
> (1,23)
> (2,43)
> (4,45)
> (3 rows)
>
> A quick skim through the 8.3. and 8.4. release notes found nothing
> interesting related to 'name'.
>
See this thread:
http://archives.postgresql.org/pgsql-general/2010-02/msg01035.php
Osvaldo
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2010-03-17 14:48 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-03-17 14:16 8.4 versus 8.2 against nonexistent column "name" ... James Robinson <jlrobins@socialserve.com>
2010-03-17 14:48 ` Osvaldo Kussama <osvaldo.kussama@gmail.com>
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