Skip site navigation (1) Skip section navigation (2)

Re: Where is the error

From: Kaloyan Iliev Iliev <news1(at)faith(dot)digsys(dot)bg>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Where is the error
Date: 2004-12-27 12:52:23
Message-ID: 41D00587.6050503@faith.digsys.bg (view raw or flat)
Thread:
Lists: 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
>
>

In response to

pgsql-general by date

Next:From: Nicolas COUSSEMACQDate: 2004-12-27 13:27:03
Subject: 8.0 Beta3 worked, RC1 didn't!
Previous:From: Kaloyan Iliev IlievDate: 2004-12-27 12:47:06
Subject: Re: Where is the error

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group