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

Re: plpgsql won't work

From: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
To: 'Infodine' <infodine(at)infodine(dot)com>, pgsql-cygwin(at)postgresql(dot)org
Subject: Re: plpgsql won't work
Date: 2002-04-29 19:10:40
Message-ID: 214E9C0A75426D47A876A2FD8A07426E6653@salem.vale-housing.co.uk (view raw or flat)
Thread:
Lists: pgsql-cygwin

> -----Original Message-----
> From: Infodine [mailto:infodine(at)infodine(dot)com] 
> Sent: 29 April 2002 19:30
> To: pgsql-cygwin(at)postgresql(dot)org
> Subject: [CYGWIN] plpgsql won't work
> 
> 
> Hi,
> 
> Using PGAdminII I created the plpgsql_call_handler function 
> pointing it to 
> the plpgsql.dll file.
> 
> Then I created the language pointing it to the handler, 
> clicked off trusted.
> 
> I then created a very simple procedure:
> 
> -- Function: sales_tax(float4)
> CREATE FUNCTION "sales_tax"("float4") RETURNS "float4" AS ' DECLARE 
> subtotal ALIAS FOR $1; BEGIN return subtotal * 0.06; END; ' 
> LANGUAGE 'plpgsql';
> 
> Then I called it using an sql window:
> 
> select sales_tax(45);
> 
> When I execute the statement the main window says executing 
> query, a few 
> seconds go by and then it says executing query...Done.  and I 
> get this error:
> 
> An error has occured in pgAdmin 
> II:frmSQLInput.cmdExecute_Click: Number : -2147467259
> Description: Error while executing query;
> No response from backend;
> Error while reading from the socket
> 
> Any ideas? I execute a plain 'sql' function and it runs fine. 
> plpgsql won't 
> run.
> 
> Any help would be appreciated, I don't know if it is a 
> windows problem so I 
> posted here first.

It works OK here on Cygwin/Win XP Pro with pgAdmin II 1.3.38. What happens
if you run it from psql?

Regards, Dave.

pgsql-cygwin by date

Next:From: Jason TishlerDate: 2002-04-29 19:19:57
Subject: Re: plpgsql won't work
Previous:From: InfodineDate: 2002-04-29 18:29:54
Subject: plpgsql won't work

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