Re: how to drop function?

From: "J(dot)V(dot)" <jvsrvcs(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: how to drop function?
Date: 2011-11-16 01:48:00
Message-ID: 4EC31650.1030305@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.
It seems to get hung up on the comma and the extra set of parenthesis

On 11/15/2011 5:01 PM, Ivan Sergio Borgonovo wrote:
> On Tue, 15 Nov 2011 16:38:20 -0700
> "J.V."<jvsrvcs(at)gmail(dot)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 have tried various ways, but it always fails.
>>
>>
>> J.V.
>>
> 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, v_table_name varchar(100)
> );*
> commit;
> BEGIN
> CREATE FUNCTION
> DROP FUNCTION
> COMMIT
> test=#
>
> Repeat just the input parameters.
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Johnston 2011-11-16 01:49:52 Re: how to drop function?
Previous Message J.V. 2011-11-16 01:25:01 Re: how to drop function?