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

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: select t.name from tbl t (where "name" is not a column name)
Дата
Msg-id 4B85669D.5000907@joeconway.com
обсуждение исходный текст
Ответ на Re: select t.name from tbl t (where "name" is not a column name)  ("Igor Neyman" <ineyman@perceptron.com>)
Список 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


Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Ivan Sergio Borgonovo
Дата:
Сообщение: C function manipulating tsquery doesn't work with -O2
Следующее
От: Amy Smith
Дата:
Сообщение: Re: how to clear server log