Re: select t.name from tbl t (where "name" is not a column name) - Mailing list pgsql-general

From Joe Conway
Subject Re: select t.name from tbl t (where "name" is not a column name)
Date
Msg-id 4B85669D.5000907@joeconway.com
Whole thread Raw
In response to Re: select t.name from tbl t (where "name" is not a column name)  ("Igor Neyman" <ineyman@perceptron.com>)
List pgsql-general
On 02/24/2010 07:16 AM, Igor Neyman wrote:
> Joe,
>
> What PG version are running?
>
> 8.2 here complains when running your example:
>
> ERROR:  column foo.name does not exist
> LINE 6: select foo.name from foo;
>                ^
>
> ********** Error **********
>
> ERROR: column foo.name does not exist
> SQL state: 42703

Prior to 8.3 you aren't able to cast a rowtype as text or name datatype,
so no matching function is found.

-------------
in 8.3.x
-------------
contrib_regression=# select text(foo) from foo;
 text
------
 (-1)
(1 row)

-------------
in 8.2.x
-------------
contrib_regression=# select text(foo) from foo;
ERROR:  function text(foo) does not exist
LINE 1: select text(foo) from foo;
               ^
HINT:  No function matches the given name and argument types. You may
need to add explicit type casts.


Joe


Attachment

pgsql-general by date:

Previous
From: Ivan Sergio Borgonovo
Date:
Subject: C function manipulating tsquery doesn't work with -O2
Next
From: Amy Smith
Date:
Subject: Re: how to clear server log