Re: Constraint stuff - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: Constraint stuff
Date
Msg-id 398EF0A0.BB614A9E@tm.ee
Whole thread Raw
In response to Constraint stuff  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: Constraint stuff  (Don Baccus <dhogaza@pacifier.com>)
List pgsql-hackers
Tom Lane wrote:
> 
> Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> > Tom had suggested storing a more
> > understandable form of the foreign key constraint
> > to make dumping more reasonable in its own table.
> > I'd guess like the src stored for check constraints.

...

> I don't think we should worry about that.  What's actually needed IMHO
> is an "ALTER FUNCTION" command that allows you to replace the body of
> an existing function, and perhaps change its name, but NOT its type
> signature (result type and number/types of arguments). 

IIRC Oracle allows the syntax CREATE OR REPLACE in many places, for 
example for changing VIEWS and PROCEDURES without affecting the things 
dependent on them.

CREATE OR REPLACE works also for not-yet-existing function which ALTER 
probably would not.

> Changing the
> signature is inherently not a transparent operation because it'd
> invalidate stored expressions that use the function.  ALTER would let
> you make safe changes to a function without changing its OID and thus
> without invalidating references-by-OID.
> 

----------
Hannu


pgsql-hackers by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Constraint stuff
Next
From: Don Baccus
Date:
Subject: Re: Re: [GENERAL] Trouble with float4 after upgrading from 6.5.3 to 7.0.2