Re: [HACKERS] alter + preserving dependencies

2008-05-07 Thread Dimitri Fontaine
Le 7 mai 08 à 07:52, Tom Lane a écrit : Dimitri Fontaine [EMAIL PROTECTED] writes: Could we consider ALTER VIEW ALTER COLUMN ... SET DEFAULT ...;? We could if we hadn't already done it five or so years ago. Or am I missing what you need here? My 8.3.1 installation psql \h only gives me:

Re: [HACKERS] alter + preserving dependencies

2008-05-07 Thread Dimitri Fontaine
Le mercredi 07 mai 2008, Dimitri Fontaine a écrit : Ok, I've been quite bad at explaining the case, let's retry. Thanks a lot to the OP on #postgresqlfr (nickname renchap), who is providing attached test case, where you'll see how we hacked our way into information_schema to have the insert

Re: [HACKERS] alter + preserving dependencies

2008-05-07 Thread Richard Huxton
Dimitri Fontaine wrote: Le 7 mai 08 à 07:52, Tom Lane a écrit : Dimitri Fontaine [EMAIL PROTECTED] writes: Could we consider ALTER VIEW ALTER COLUMN ... SET DEFAULT ...;? We could if we hadn't already done it five or so years ago. Or am I missing what you need here? My 8.3.1 installation

Re: [HACKERS] alter + preserving dependencies

2008-05-07 Thread Tom Lane
Dimitri Fontaine [EMAIL PROTECTED] writes: My 8.3.1 installation psql \h only gives me: Syntax: ALTER VIEW name RENAME TO newname You're not the first person to think that ALTER VIEW covers everything that can be done to a view. I'm starting to think that we should just make ALTER VIEW be an

Re: [HACKERS] alter + preserving dependencies

2008-05-07 Thread Kevin Grittner
Tom Lane [EMAIL PROTECTED] wrote: Dimitri Fontaine [EMAIL PROTECTED] writes: My 8.3.1 installation psql \h only gives me: Syntax: ALTER VIEW name RENAME TO newname You're not the first person to think that ALTER VIEW covers everything that can be done to a view. I'm starting to think

Re: [HACKERS] alter + preserving dependencies

2008-05-07 Thread Dimitri Fontaine
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le 7 mai 08 à 16:26, Tom Lane a écrit : I'm starting to think that we should just make ALTER VIEW be an alias for ALTER TABLE (rather than a separate node type as now), and then list in the ALTER VIEW reference page all of the ALTER TABLE

[HACKERS] alter + preserving dependencies

2008-05-06 Thread Andrew Dunstan
I have a client who is looking for a way to be able to alter objects without having to recreate (say, from a dump) all the objects in a possibly large dependency tree rooted at the object. Of course, if the alteration invalidates the dependency, than this operation should fail, but adding a

Re: [HACKERS] alter + preserving dependencies

2008-05-06 Thread Josh Berkus
Andrew Dunstan wrote: I have a client who is looking for a way to be able to alter objects without having to recreate (say, from a dump) all the objects in a possibly large dependency tree rooted at the object. Of course, if the alteration invalidates the dependency, than this operation

Re: [HACKERS] alter + preserving dependencies

2008-05-06 Thread Andrew Dunstan
Josh Berkus wrote: Andrew Dunstan wrote: I have a client who is looking for a way to be able to alter objects without having to recreate (say, from a dump) all the objects in a possibly large dependency tree rooted at the object. Of course, if the alteration invalidates the dependency,

Re: [HACKERS] alter + preserving dependencies

2008-05-06 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: Josh Berkus wrote: I don't follow you. I can currently add a column, without breaking either foriegn keys or inheritance. What's the problem? not for a view at least. Yeah, the restrictions on replacing a view definition date from before we had any

Re: [HACKERS] alter + preserving dependencies

2008-05-06 Thread Dimitri Fontaine
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Le 6 mai 08 à 19:44, Tom Lane a écrit : Andrew Dunstan [EMAIL PROTECTED] writes: Josh Berkus wrote: I don't follow you. I can currently add a column, without breaking either foriegn keys or inheritance. What's the problem? not for a

Re: [HACKERS] alter + preserving dependencies

2008-05-06 Thread Tom Lane
Dimitri Fontaine [EMAIL PROTECTED] writes: Could we consider ALTER VIEW ALTER COLUMN ... SET DEFAULT ...;? We could if we hadn't already done it five or so years ago. Or am I missing what you need here? Bonus question: why is the rewriter unable to distinguish whether NULL comes from the