pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Dependence beetwen Function
8+ messages / 4 participants
[nested] [flat]

* Dependence beetwen Function
@ 2002-03-12 16:23  Gaetano Mendola <mendola@bigfoot.com>
  0 siblings, 3 replies; 8+ messages in thread

From: Gaetano Mendola @ 2002-03-12 16:23 UTC (permalink / raw)
  To: pgsql-admin

Hi to all

Suppose that I have the function A that use the fucntion B.
When I drop and reconstruct B I should also reconstruct A.
Can I avoid this ?
Is a really problem with hundreds of function around.


Ciao
Gaetano

-- 
#exclude <windows>
#include <CSRSS>
printf("\t\t\b\b\b\b\b\b");.
printf("\t\t\b\b\b\b\b\b");




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Dependence beetwen Function
@ 2002-03-12 17:18  Stephan Szabo <sszabo@megazone23.bigpanda.com>
  parent: Gaetano Mendola <mendola@bigfoot.com>
  2 siblings, 1 reply; 8+ messages in thread

From: Stephan Szabo @ 2002-03-12 17:18 UTC (permalink / raw)
  To: Gaetano Mendola <mendola@bigfoot.com>; +Cc: pgsql-admin


On Tue, 12 Mar 2002, Gaetano Mendola wrote:

> Hi to all
>
> Suppose that I have the function A that use the fucntion B.
> When I drop and reconstruct B I should also reconstruct A.
> Can I avoid this ?
> Is a really problem with hundreds of function around.

If you're using 7.2 you can use create or replace function
rather than drop function followed by create function.





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Dependence beetwen Function
@ 2002-03-12 19:14  Dan Langille <dan@langille.org>
  parent: Gaetano Mendola <mendola@bigfoot.com>
  2 siblings, 1 reply; 8+ messages in thread

From: Dan Langille @ 2002-03-12 19:14 UTC (permalink / raw)
  To: Stephan Szabo <sszabo@megazone23.bigpanda.com>; +Cc: pgsql-admin

On 12 Mar 2002 at 9:18, Stephan Szabo wrote:

> 
> On Tue, 12 Mar 2002, Gaetano Mendola wrote:
> 
> > Hi to all
> >
> > Suppose that I have the function A that use the fucntion B.
> > When I drop and reconstruct B I should also reconstruct A.
> > Can I avoid this ?
> > Is a really problem with hundreds of function around.
> 
> If you're using 7.2 you can use create or replace function
> rather than drop function followed by create function.

I just finished updating my SP and RI functions to take advantage of this. 
 While doing that I starting thinking about triggers.  Checking the 
documentation, I don't see a similar feature for triggers.  I'm guessing 
that triggers do not suffer from the same problem as that which prompted 
the original post.

-- 
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Dependence beetwen Function
@ 2002-03-12 20:50  Stephan Szabo <sszabo@megazone23.bigpanda.com>
  parent: Dan Langille <dan@langille.org>
  0 siblings, 0 replies; 8+ messages in thread

From: Stephan Szabo @ 2002-03-12 20:50 UTC (permalink / raw)
  To: Dan Langille <dan@langille.org>; +Cc: pgsql-admin


On Tue, 12 Mar 2002, Dan Langille wrote:

> On 12 Mar 2002 at 9:18, Stephan Szabo wrote:
>
> >
> > On Tue, 12 Mar 2002, Gaetano Mendola wrote:
> >
> > > Hi to all
> > >
> > > Suppose that I have the function A that use the fucntion B.
> > > When I drop and reconstruct B I should also reconstruct A.
> > > Can I avoid this ?
> > > Is a really problem with hundreds of function around.
> >
> > If you're using 7.2 you can use create or replace function
> > rather than drop function followed by create function.
>
> I just finished updating my SP and RI functions to take advantage of this.
>  While doing that I starting thinking about triggers.  Checking the
> documentation, I don't see a similar feature for triggers.  I'm guessing
> that triggers do not suffer from the same problem as that which prompted
> the original post.

I don't know of anything that directly refers to triggers.
You will however want to use create or replace function on the functions
refered to by triggers since that way you don't need to drop and recreate
the trigger.




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Dependence beetwen Function
@ 2002-03-13 09:23  Gaetano Mendola <mendola@bigfoot.com>
  parent: Stephan Szabo <sszabo@megazone23.bigpanda.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Gaetano Mendola @ 2002-03-13 09:23 UTC (permalink / raw)
  To: Stephan Szabo <sszabo@megazone23.bigpanda.com>; +Cc: pgsql-admin

"Stephan Szabo" <sszabo@megazone23.bigpanda.com> wrote:
> On Tue, 12 Mar 2002, Gaetano Mendola wrote:
> 
> > Hi to all
> >
> > Suppose that I have the function A that use the fucntion B.
> > When I drop and reconstruct B I should also reconstruct A.
> > Can I avoid this ?
> > Is a really problem with hundreds of function around.
> 
> If you're using 7.2 you can use create or replace function
> rather than drop function followed by create function.
> 
Fine. Yesterday with the release 7.1.3 I notice that if a table have a
constraint like this:


CREATE TABLE user_data (
.......
login VARCHAR(64) NOT NULL CHECK ( myFunction(login) ),
......
);

if I drop and recreate the function myFunction
I'm not able to insert data on table user_data.
May be with the version 7.2 this problem not exist anymore
(with the replace feature) but I notice also that if I do a 

pg_dump > dump.sql

I have on dump.sql before the creation of tables and after the
creation of functions, in this way the table user_data is not
created ... :-(



I hope that this was fixed in version 7.2

Ciao
Gaetano

-- 
#exclude <windows>
#include <CSRSS>
printf("\t\t\b\b\b\b\b\b");.
printf("\t\t\b\b\b\b\b\b");






^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Dependence beetwen Function
@ 2002-03-13 11:41  Jean-Michel POURE <jm.poure@freesurf.fr>
  parent: Gaetano Mendola <mendola@bigfoot.com>
  2 siblings, 1 reply; 8+ messages in thread

From: Jean-Michel POURE @ 2002-03-13 11:41 UTC (permalink / raw)
  To: Gaetano Mendola <mendola@bigfoot.com>; pgsql-admin

Le Mardi 12 Mars 2002 17:23, Gaetano Mendola a écrit :
> Hi to all
> Suppose that I have the function A that use the fucntion B.
> When I drop and reconstruct B I should also reconstruct A.
> Can I avoid this ?
> Is a really problem with hundreds of function around.
> Ciao
> Gaetano

Dear Gaetano,

pgAdmin2 (http://www.pgadmin.org) support CREATE OR REPLACE FUNCTION. Also, 
the CVS latest version offers pseudo modification of views and triggers 
(binaries available in CVS).

Regards, Jean-Michel POURE



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Dependence beetwen Function
@ 2002-03-13 15:11  Gaetano Mendola <mendola@bigfoot.com>
  parent: Jean-Michel POURE <jm.poure@freesurf.fr>
  0 siblings, 1 reply; 8+ messages in thread

From: Gaetano Mendola @ 2002-03-13 15:11 UTC (permalink / raw)
  To: jm.poure@freesurf.fr; pgsql-admin

"Jean-Michel POURE" <jm.poure@freesurf.fr>> Dear Gaetano,
>
> pgAdmin2 (http://www.pgadmin.org) support CREATE OR REPLACE FUNCTION.
Also,
> the CVS latest version offers pseudo modification of views and triggers
> (binaries available in CVS).


But of course I should use it with the version 7.2 for use this feature.
Or not ?



Ciao
Gaetano

--
#exclude <windows>
#include <CSRSS>
printf("\t\t\b\b\b\b\b\b");.
printf("\t\t\b\b\b\b\b\b");




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Dependence beetwen Function
@ 2002-03-13 16:34  Jean-Michel POURE <jm.poure@freesurf.fr>
  parent: Gaetano Mendola <mendola@bigfoot.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Jean-Michel POURE @ 2002-03-13 16:34 UTC (permalink / raw)
  To: Gaetano Mendola <mendola@bigfoot.com>; pgsql-admin

Le Mercredi 13 Mars 2002 16:11, Gaetano Mendola a écrit :
> But of course I should use it with the version 7.2 for use this feature.
> Or not ?
Yes, CREATE OR REPLACE FUNCTION is only available from PostgreSQL 7.2+.



^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2002-03-13 16:34 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-03-12 16:23 Dependence beetwen Function Gaetano Mendola <mendola@bigfoot.com>
2002-03-12 17:18 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2002-03-13 09:23   ` Gaetano Mendola <mendola@bigfoot.com>
2002-03-12 19:14 ` Dan Langille <dan@langille.org>
2002-03-12 20:50   ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2002-03-13 11:41 ` Jean-Michel POURE <jm.poure@freesurf.fr>
2002-03-13 15:11   ` Gaetano Mendola <mendola@bigfoot.com>
2002-03-13 16:34     ` Jean-Michel POURE <jm.poure@freesurf.fr>

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