Re: Where is the error

Поиск
Список
Период
Сортировка
От Kaloyan Iliev Iliev
Тема Re: Where is the error
Дата
Msg-id 41D00587.6050503@faith.digsys.bg
обсуждение исходный текст
Ответ на Where is the error  (Kaloyan Iliev Iliev <news1@faith.digsys.bg>)
Список pgsql-general
Thanks To you all.

The problem was that the int was reserved. When I try

CREATE FUNCTION my_int(boolean) RETURNS integer AS '
select CASE WHEN $1 THEN 1
 ELSE 0
END ' LANGUAGE sql;

it worked.

But now I have to change it on many places. This is not good beacause on
the old version of PG (form where I dumped) everithing was OK:)

Kaloyan

Kaloyan Iliev Iliev wrote:

> Hi
>  I have the following function:
>
> CREATE OR REPLACE FUNCTION "int" (boolean) RETURNS integer AS'
> select CASE WHEN $1 THEN 1
> ELSE 0
> END
> 'LANGUAGE 'sql';
>
> When I try to use it:
>
> select int('t'::bool);
> ERROR:  syntax error at or near "(" at character 11
>
> I am using PG8.0b1
>
> Thank you.
>
>      Kaloyan
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>
>

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

Предыдущее
От: Kaloyan Iliev Iliev
Дата:
Сообщение: Re: Where is the error
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: Get current trasanction id