Re: Where is the error

Поиск
Список
Период
Сортировка
От John DeSoi
Тема Re: Where is the error
Дата
Msg-id BAAD37CC-5801-11D9-B0A0-000A95B03262@pgedit.com
обсуждение исходный текст
Ответ на Where is the error  (Kaloyan Iliev Iliev <news1@faith.digsys.bg>)
Ответы Re: Where is the error
Re: Where is the error
Список pgsql-general
On Dec 27, 2004, at 6:42 AM, Kaloyan Iliev Iliev wrote:

> CREATE OR REPLACE FUNCTION "int" (boolean) RETURNS integer AS'
> select CASE WHEN $1 THEN 1
> ELSE 0
> END
> 'LANGUAGE 'sql';
>

The problem is that you have quoted the function name as "int". You
should only do this when you want to force the exact case of the name.
When you do it this way, you have to use double quotes when you refer
to the identifier:


select "int"('t'::boolean);
  int
-----
    1
(1 row)


So in this case you probably want to call your function int -- without
quotes. By default, PostgreSQL folds the names to lowercase.


Best,

John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Get current trasanction id
Следующее
От: Marek Lewczuk
Дата:
Сообщение: Re: Where is the error