Re: alter + preserving dependencies

From: Dimitri Fontaine <dim(at)hi-media(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: alter + preserving dependencies
Date: 2008-05-07 05:41:38
Message-ID: 1A1CA5D7-C727-41BB-A5D6-8D143E18ACE3@hi-media.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Le 6 mai 08 à 19:44, Tom Lane a écrit :

> Andrew Dunstan <andrew(at)dunslane(dot)net> 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 fancy ALTER TABLE stuff. They could probably use a re-
> visit.

Could we add some other VIEWs features while revisiting?
We had some question on #postgresqlfr about updatable views and the
rewrite rule system, which I could chat about with Jan Wieck on
#postgresql too. The problem we had was related to DEFAULT versus NULL
handling from an insert or update RULE and how to avoid having an
absent column rewritten as NULL instead of DEFAULT.

Could we consider ALTER VIEW ALTER COLUMN ... SET DEFAULT ...;?

Bonus question: why is the rewriter unable to distinguish whether NULL
comes from the user or comes from the column was not part of the user
query?

Regards,
- --
dim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iEYEARECAAYFAkghQRIACgkQlBXRlnbh1bnWAQCeNF4RJwWLcGmmPPE8eUGn3/Yi
6NEAn1YOQ3Bz7L+tD01rQqqeyNt7djwA
=MXD8
-----END PGP SIGNATURE-----

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-05-07 05:52:10 Re: alter + preserving dependencies
Previous Message Bruce Momjian 2008-05-07 04:35:06 Re: [HACKERS] Re: a tsearch2 (8.2.4) dictionary that only filters out stopwords