From: | Janning Vygen <vygen(at)planwerk6(dot)de> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "PostgreSQL-General" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: function cache?? |
Date: | 2001-06-29 15:14:46 |
Message-ID: | 01062917144600.02151@janning |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Am Freitag, 29. Juni 2001 16:53 schrieb Tom Lane:
> Janning Vygen <vygen(at)planwerk6(dot)de> writes:
> > it seems to me that function are not reloaded vene if id rop them and
> > recreate them.
>
> That's hard to believe. Example please?
>
> regards, tom lane
small webpage is grabbing some contactdata.
i have a shell script which drops and recreates datatbase
and the cat the following with
cat sql_commands | psql kontaktdaten
last thing i added was the telephone check
and it seems that the backend just dont care about it.
but i do believe that i did a mistake anywhere else, os i go and search for
it.
>>> file sql_commands
\connect - janning
CREATE TABLE kontakte (
kontakte_id serial,
empfaenger text,
anrede text,
name text,
vorname text,
email text,
telefon text,
firma text,
nachricht text,
aufmerksam text,
newsletter text
);
CREATE FUNCTION check_kontakte () RETURNS OPAQUE AS '
BEGIN
IF NEW.anrede = ''0'' THEN
NEW.anrede := NULL;
END IF;
IF NEW.aufmerksam = ''0'' THEN
NEW.aufmerksam := NULL;
END IF;
IF NEW.telefon ISNULL THEN
RAISE EXCEPTION ''Bitte geben Sie ihre Telefonnumer an'';
RETURN NULL;
END IF;
RETURN NEW;
END;
' LANGUAGE 'plpgsql';
CREATE TRIGGER if_kontakte BEFORE INSERT OR UPDATE ON kontakte
FOR EACH ROW EXECUTE PROCEDURE check_kontakte();
--
Planwerk 6 /websolutions
Herzogstraße 86
40215 Düsseldorf
fon 0211-6015919
fax 0211-6015917
http://www.planwerk6.de
From | Date | Subject | |
---|---|---|---|
Next Message | Vivek Khera | 2001-06-29 15:20:29 | Re: pg_hba.conf problems |
Previous Message | Josh Berkus | 2001-06-29 15:02:50 | Evaluating Subselects |