From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | Marco Tulio <anjo(dot)doce(dot)marilia(at)bol(dot)com(dot)br> |
Cc: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: User Defined Function |
Date: | 2002-02-18 18:37:22 |
Message-ID: | 20020218103304.D75404-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Mon, 18 Feb 2002, Marco Tulio wrote:
> Hi,
>
> If I create a user defined function, and use it in a
> CHECK statment when I create a table, its works fine.
>
> But if I need recreate this function, the table cant
> anymore accept data, because cant locate the function.
>
> I cant recreate the table, or Ill lost data. (ok, I
> can make a dump, and recreate , but...) ...
Unfortunately under 7.1, you'd probably be best off doing
it that way (you could probably mess around with pg_relcheck
and pg_class to remove/change the constraint but that's
iffy). Under 7.2 you'd be able to either use
create or replace function or alter table drop/add constraint
to maintain it.
> I have another way to use my fuctions to validate datas ?
You could also use a before trigger which would then require
dropping the trigger function and trigger as well, but a check
constraint seems more reasonable.
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2002-02-18 19:02:16 | Re: Hebrew support |
Previous Message | Marco Tulio | 2002-02-18 16:34:06 | User Defined Function |