Re: [HACKERS] Re: [QUESTIONS] using composite types

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] Re: [QUESTIONS] using composite types
Дата
Msg-id 199803131614.LAA14511@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [QUESTIONS] using composite types  ("Thomas G. Lockhart" <lockhart@alumni.caltech.edu>)
Список pgsql-hackers
> What you want to do can probably be accomplished with inheritance, but
> that only seems to work if you have unique names for more of your
> fields:
>
>   create table A ( a int, b int);
>   create table D ( c int) inherits (A);
>
> But, if you try
>
>   create table D ( b int) inherits (A);
>
> then the new column in D gets lost without warning!


Patient:  Ow, doctor, it hurts when I do this.
Doctor:   Well, then don't do that.

---------------------------------------------------------------------------

This is a pretty bizarre example, and I am not sure how the system will
handle this.  My guess is that it finds only the first b.  Seems like we
need a check somewhere when making inheritance.  I will add it to the
TODO.

    * disallow inherited columns with the same name as new columns

--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

В списке pgsql-hackers по дате отправления:

Предыдущее
От: jwieck@debis.com (Jan Wieck)
Дата:
Сообщение: Re: PL/PgSQL discussion
Следующее
От: "Jackson, DeJuan"
Дата:
Сообщение: RE: [HACKERS] PL/pgSQL - for discussion (RETURN)