"Gaetano Mendola" <mendola(at)bigfoot(dot)com> writes:
> Tom Lane wrote:
> > Gaetano Mendola <mendola(at)bigfoot(dot)com> writes:
> >>I think a warning is missing if I create a table without OIDS that
> >>inherits from a table with oids:
> >>don't you think a warning shall to be raised here ?
> > Nope ... this is not different from the behavior for merging duplicate
> > column definitions. You get an OID column if the child table definition
> > *or* any parent table requests OIDs.
> Mmm, you are not convincing me, don't we break the principle of minor
> I mean if you duplicate a column name that column is present on the
> table, but if I say: I don't want the column OID and I found it, this
> surprise me.
Speaking in generic OO terms, using inheritance, you cannot remove
attributes that are present in the generalisation. If B inherits A, an
instance of B is per definition also an instance of A. Thus, you must alwasy
be able to cast a B into an A. In short, If you don't want the OID, you
cannot inherit a something that has an OID.
Having said that, I think a warning is motivated. The warning should state
that attributes (columns) present in the generalisation (the parent table)
cannot be hidden.
In response to
pgsql-hackers by date
|Next:||From: Bruce Momjian||Date: 2004-06-23 10:14:15|
|Subject: COPY security fix|
|Previous:||From: Simon Riggs||Date: 2004-06-23 08:46:40|
|Subject: Re: PITR Recovery|