edit function

From: Rakotomandimby Mihamina <mihamina(at)gulfsat(dot)mg>
To: pgsql-general(at)postgresql(dot)org
Subject: edit function
Date: 2009-09-07 06:26:27
Message-ID: 4AA4A793.9000001@gulfsat.mg
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,
On a PostGreSQL 8.1 (Debian Etch)

I have a function like this:

CREATE FUNCTION f_active_client(character varying)
RETURNS character varying
AS $_$
DECLARE
v_modem ALIAS FOR $1;
v_firstuse BOOLEAN;
v_admactive BOOLEAN;
v_codeclt varchar;
BEGIN
SELECT INTO (...)
IF FOUND THEN
(...)
ELSE
RETURN 'ERROR';
END IF;
END;
$_$

I have to insert several IF statements in the "IF FOUND" one.
I wont do it one time, I will insert them one by one.

I cannot stop too much long the PG server (a /etc/init.d restart time
is OK, more is not)

Dumping and the restoring is not possible because of too long downtime.

DELETing CREATing the function is not possible because of dependency.

When looking at the help, '\h' has no REPLACE FUNCTION.
Only ALTER FUNCTION

How to manage it?

Thank you.

--
Architecte Informatique chez Blueline/Gulfsat:
Administration Systeme, Recherche & Developpement
+261 34 29 155 34

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Guillaume Lelarge 2009-09-07 06:31:05 Re: edit function
Previous Message APseudoUtopia 2009-09-07 02:39:28 Re: tsvector Column Indexing Across Two Tables