pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
User Defined Function 2+ messages / 2 participants [nested] [flat]
* User Defined Function @ 2002-02-18 16:34 Marco Tulio <anjo.doce.marilia@bol.com.br> 2002-02-18 18:37 ` Re: User Defined Function Stephan Szabo <sszabo@megazone23.bigpanda.com> 0 siblings, 1 reply; 2+ messages in thread From: Marco Tulio @ 2002-02-18 16:34 UTC (permalink / raw) To: pgsql-admin 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 can´t anymore accept data, because can´t locate the function. I can´t recreate the table, or I´ll lost data. (ok, I can make a dump, and recreate , but...) ... I have another way to use my fuctions to validate datas ? regards, Tulio Marco Tulio Desenvolvimento de sistemas para Internet __________________________________________________________________________ Quer ter seu próprio endereço na Internet? Garanta já o seu e ainda ganhe cinco e-mails personalizados. DomíniosBOL - http://dominios.bol.com.br ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: User Defined Function 2002-02-18 16:34 User Defined Function Marco Tulio <anjo.doce.marilia@bol.com.br> @ 2002-02-18 18:37 ` Stephan Szabo <sszabo@megazone23.bigpanda.com> 0 siblings, 0 replies; 2+ messages in thread From: Stephan Szabo @ 2002-02-18 18:37 UTC (permalink / raw) To: Marco Tulio <anjo.doce.marilia@bol.com.br>; +Cc: 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 can´t > anymore accept data, because can´t locate the function. > > I can´t recreate the table, or I´ll 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. ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-02-18 18:37 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2002-02-18 16:34 User Defined Function Marco Tulio <anjo.doce.marilia@bol.com.br> 2002-02-18 18:37 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox