10x John,

You are right.The problem is that the function was dumped with quotes from pg_dump but I suppose the one who created it used quotes and that's why it dumps in this way.
I will fix this in the dump.


Thanks again.

    Kaloyan

John DeSoi wrote:


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



---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Reply via email to