Re: Problem with functions - Mailing list pgsql-cygwin

From George Weaver
Subject Re: Problem with functions
Date
Msg-id 00c401c36c03$708c7220$9c08a18e@cleartag
Whole thread Raw
In response to Re: 7.3.4 upgrade  (Claudio Natoli <claudio.natoli@memetrics.com>)
List pgsql-cygwin
Hi Richard,
 
When you're creating types in pgAdminII you have to scroll down the list of types to get past the array types which list first.  You should find bool further down the list from bool[], and obviously you want the former.
 
You might find it easier for debugging and updating to write your function scripts in a text editor and load them into pgAdminII using the query editor.
 
Your query is off topic for this list, which deals with issues for Cygwin.  You should address queries specific to pgAdminII to the pgadmin-support list, and queries concerning SQL and related topics (functions, etc.) to the pgsql-sql list.
 
HTH,
George
----- Original Message -----
Sent: Tuesday, August 26, 2003 9:00 AM
Subject: [CYGWIN] Problem with functions

I have used pgadminII to create a series of functions. However it appears that they are all all given array parameters. ( see the definition shown below) If I create the function manually with a return type of "bool" instead of "bool[]" all is ok. However if I use pgadmin then I get a horrible error
 
ERROR:  array_in: Need to specify dimension
 
I am happily using a number of procedure in SYBASE SQL Anywhere and am trying to port the database to postgresql. but this error now means I will have to edit them all!
 
Is there a way to change the behaviour of pgadmin or does everyone enter their functions as pure SQL?
 
thanks
 
Richard.
 
Error Message is :
 
ERROR:  array_in: Need to specify dimension
 
The attempt to activate the procedure is given as :
 
select test_fn();
 
and the function definition itself is:
 

-- Function: public.test_fn()

CREATE FUNCTION public.test_fn() RETURNS bool[] AS 'begin

.......

return true;

end;' LANGUAGE 'plpgsql' VOLATILE;

 

pgsql-cygwin by date:

Previous
From: Jason Tishler
Date:
Subject: Re: running postgresql7.3.4 under windows
Next
From: "Chigurupati, Prasad"
Date:
Subject: Re: running postgresql7.3.4 under windows