Search Postgresql Archives

Re: select t.name from tbl t (where "name" is not a column name)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux