Re: Re: Changing the default value of an inherited column - Mailing list pgsql-hackers

From Oliver Elphick
Subject Re: Re: Changing the default value of an inherited column
Date
Msg-id 200103291329.f2TDTd324709@linda.lfix.co.uk
Whole thread Raw
In response to Re: Changing the default value of an inherited column  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Re: Changing the default value of an inherited column  (Peter Eisentraut <peter_e@gmx.net>)
Re: Re: Changing the default value of an inherited column  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Re: Changing the default value of an inherited column  (ncm@zembu.com (Nathan Myers))
List pgsql-hackers
Peter Eisentraut wrote: >Tom Lane writes: > >> It seems that in pre-7.0 Postgres, this works: >> >> create table one(id
intdefault 1, descr text); >> create table two(id int default 2, tag text) inherits (one); >> >> with the net effect
thattable "two" has just one "id" column with >> default value 2. > >Although the liberty to do anything you want seems
appealingat first, I >would think that allowing this is not correct from an OO point of view.
 

I don't agree; this is equivalent to redefinition of a feature (=method) in
a descendant class, which is perfectly acceptable so long as the feature's
signature (equivalent to column type) remains unchanged.

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
========================================   "Trust in the Lord with all your heart and lean not on      your own
understanding;in all your ways acknowledge       him, and he will direct your paths."  Proverbs 3:5,6  
 




pgsql-hackers by date:

Previous
From: "Oliver Elphick"
Date:
Subject: Re: Changing the default value of an inherited column
Next
From: Jeroen Eitjes
Date:
Subject: Problem with group by in conjuction with Views