pgsql/src backend/catalog/dependency.c backend ...

Started by Tom Laneabout 24 years ago5 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

CVSROOT: /cvsroot
Module name: pgsql
Changes by: tgl@postgresql.org 02/07/15 12:33:32

Modified files:
src/backend/catalog: dependency.c heap.c indexing.c
src/backend/commands: tablecmds.c
src/include/catalog: catversion.h heap.h indexing.h pg_attrdef.h

Log message:
Use the dependency mechanism to manage column defaults. We need this
so that dependencies in default expressions (on operators, functions,
etc) can be expressed properly.

#2Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: Tom Lane (#1)
Re: pgsql/src backend/catalog/dependency.c backend ...

Does this mean I no longer have to worry about removing the column default
when dropping a column?

Chris

Show quoted text

Modified files:
src/backend/catalog: dependency.c heap.c indexing.c
src/backend/commands: tablecmds.c
src/include/catalog: catversion.h heap.h indexing.h pg_attrdef.h

Log message:
Use the dependency mechanism to manage column defaults. We
need this
so that dependencies in default expressions (on operators,
functions,
etc) can be expressed properly.

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Christopher Kings-Lynne (#2)
Re: pgsql/src backend/catalog/dependency.c backend ...

"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:

Does this mean I no longer have to worry about removing the column default
when dropping a column?

It'll happen for free if you do the DROP properly, ie, through
performDeletion. Fairly shortly, constraints, indexes, and so forth
that depend on the column will also go away automatically.

regards, tom lane

#4Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: Tom Lane (#3)
Re: pgsql/src backend/catalog/dependency.c backend ...

I presume I still have to manually set atthasdef to false tho, right?

Chris

Show quoted text

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Tuesday, 16 July 2002 12:05 PM
To: Christopher Kings-Lynne
Cc: pgsql-committers@postgresql.org
Subject: Re: [COMMITTERS] pgsql/src backend/catalog/dependency.c backend
...

"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:

Does this mean I no longer have to worry about removing the

column default

when dropping a column?

It'll happen for free if you do the DROP properly, ie, through
performDeletion. Fairly shortly, constraints, indexes, and so forth
that depend on the column will also go away automatically.

regards, tom lane

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Christopher Kings-Lynne (#4)
Re: pgsql/src backend/catalog/dependency.c backend ...

"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:

I presume I still have to manually set atthasdef to false tho, right?

No, that's part of the DROP DEFAULT behavior....

regards, tom lane