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

Re: Problem with functions

From: "George Weaver" <georgew1(at)mts(dot)net>
To: <pgsql-cygwin(at)postgresql(dot)org>
Subject: Re: Problem with functions
Date: 2003-08-26 18:54:11
Message-ID: 00c401c36c03$708c7220$9c08a18e@cleartag (view raw or flat)
Thread:
Lists: 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 ----- 
  From: Richard Sydney-Smith 
  To: pgsql-cygwin(at)postgresql(dot)org 
  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;

In response to

pgsql-cygwin by date

Next:From: Dave PageDate: 2003-08-26 20:31:26
Subject: Re: Problem with functions
Previous:From: Jason TishlerDate: 2003-08-26 18:20:56
Subject: Re: running postgresql7.3.4 under windows

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