Re: [GENERAL] how to drop function?

2011-11-16 Thread Ivan Sergio Borgonovo
On Tue, 15 Nov 2011 18:48:00 -0700 J.V. jvsr...@gmail.com wrote: the drop function works when running from a pgAdmin III Sql window but when I try to do from the command line and script it: psql -h $PGHOST -p $PGPORT -d $PGDATABASE -U $PGUSER -c *drop function * the above fails.

Re: [GENERAL] how to drop function?

2011-11-16 Thread Thomas Kellerer
Ivan Sergio Borgonovo, 16.11.2011 01:01: test=# begin; create or replace function process_table ( action TEXT, v_table_name varchar(100) ) RETURNS BOOLEAN AS $$ DECLARE BEGIN return true; END; $$ LANGUAGE plpgsql; drop function process_table ( action TEXT,

Re: [GENERAL] how to drop function?

2011-11-16 Thread Ivan Sergio Borgonovo
On Wed, 16 Nov 2011 09:17:45 +0100 Thomas Kellerer spam_ea...@gmx.net wrote: Ivan Sergio Borgonovo, 16.11.2011 01:01: test=# begin; create or replace function process_table ( action TEXT, v_table_name varchar(100) ) RETURNS BOOLEAN AS $$ DECLARE BEGIN return

[GENERAL] how to drop function?

2011-11-15 Thread J.V.
How do I drop a function that was created like so: create or replace function process_table (action TEXT, v_table_name varchar(100)) RETURNS BOOLEAN AS $$ DECLARE BEGIN ... END; $$ LANGUAGE plpgsql; --- I have tried various ways, but it always fails. J.V. -- Sent via pgsql-general

Re: [GENERAL] how to drop function?

2011-11-15 Thread Craig Ringer
On 11/16/2011 07:38 AM, J.V. wrote: How do I drop a function that was created like so: create or replace function process_table (action TEXT, v_table_name varchar(100)) RETURNS BOOLEAN AS $$ DECLARE BEGIN ... END; $$ LANGUAGE plpgsql; --- I have tried various ways, but it always fails.

Re: [GENERAL] how to drop function?

2011-11-15 Thread Rebecca Clarke
DROP FUNCTION process_table; should work. On Tue, Nov 15, 2011 at 11:38 PM, J.V. jvsr...@gmail.com wrote: How do I drop a function that was created like so: create or replace function process_table (action TEXT, v_table_name varchar(100)) RETURNS BOOLEAN AS $$ DECLARE BEGIN ...

Re: [GENERAL] how to drop function?

2011-11-15 Thread Adrian Klaver
On Tuesday, November 15, 2011 3:56:32 pm Rebecca Clarke wrote: DROP FUNCTION process_table; should work. Actually no, for the following reason:( http://www.postgresql.org/docs/9.0/interactive/sql-dropfunction.html DROP FUNCTION removes the definition of an existing function. To execute

Re: [GENERAL] how to drop function?

2011-11-15 Thread Ivan Sergio Borgonovo
On Tue, 15 Nov 2011 16:38:20 -0700 J.V. jvsr...@gmail.com wrote: How do I drop a function that was created like so: create or replace function process_table (action TEXT, v_table_name varchar(100)) RETURNS BOOLEAN AS $$ DECLARE BEGIN ... END; $$ LANGUAGE plpgsql; --- I

Re: [GENERAL] how to drop function?

2011-11-15 Thread J.V.
this did not work. On 11/15/2011 4:56 PM, Craig Ringer wrote: On 11/16/2011 07:38 AM, J.V. wrote: How do I drop a function that was created like so: create or replace function process_table (action TEXT, v_table_name varchar(100)) RETURNS BOOLEAN AS $$ DECLARE BEGIN ... END; $$ LANGUAGE

Re: [GENERAL] how to drop function?

2011-11-15 Thread J.V.
this does not work. On 11/15/2011 4:56 PM, Rebecca Clarke wrote: DROP FUNCTION process_table; should work. On Tue, Nov 15, 2011 at 11:38 PM, J.V. jvsr...@gmail.com mailto:jvsr...@gmail.com wrote: How do I drop a function that was created like so: create or replace function

Re: [GENERAL] how to drop function?

2011-11-15 Thread J.V.
the drop function works when running from a pgAdmin III Sql window but when I try to do from the command line and script it: psql -h $PGHOST -p $PGPORT -d $PGDATABASE -U $PGUSER -c *drop function * the above fails. It does however work with functions with no params or a single param.

Re: [GENERAL] how to drop function?

2011-11-15 Thread David Johnston
On Nov 15, 2011, at 20:24, J.V. jvsr...@gmail.com wrote: this did not work. On 11/15/2011 4:56 PM, Craig Ringer wrote: On 11/16/2011 07:38 AM, J.V. wrote: How do I drop a function that was created like so: create or replace function process_table (action TEXT, v_table_name varchar(100))

Re: [GENERAL] how to drop function?

2011-11-15 Thread Scott Marlowe
On Tue, Nov 15, 2011 at 6:48 PM, J.V. jvsr...@gmail.com wrote: the drop function works when running from a pgAdmin III Sql window but when I try to do from the command line and script it:     psql -h $PGHOST -p $PGPORT -d $PGDATABASE -U $PGUSER -c drop function the above fails.

Re: [GENERAL] how to drop function?

2011-11-15 Thread John R Pierce
On 11/15/11 5:48 PM, J.V. wrote: the drop function works when running from a pgAdmin III Sql window but when I try to do from the command line and script it: psql -h $PGHOST -p $PGPORT -d $PGDATABASE -U $PGUSER -c *drop function * the above fails. can you please give the complete