Re: how to create a new composite type using already existing composite types
В списке pgsql-general по дате отправления:
| От | Jeff Davis |
|---|---|
| Тема | Re: how to create a new composite type using already existing composite types |
| Дата | |
| Msg-id | 1266107070.29919.5924.camel@jdavis обсуждение исходный текст |
| Ответ на | how to create a new composite type using already existing composite types (Iain Barnett <iainspeed@gmail.com>) |
| Ответы |
Re: how to create a new composite type using already
existing composite types
|
| Список | pgsql-general |
On Wed, 2010-02-10 at 03:46 +0000, Iain Barnett wrote:
> CREATE TYPE inventory_item2 AS (
> name text,
> supplier_id integer,
> price numeric,
> size integer
> );
>
>
> but it would be handy if I could reuse inventory_item instead of
> having to retype the whole lot. I can't work out or find the right
> syntax, can anyone show me how? Any help would be much appreciated.
What about:
CREATE TYPE inventory_item2 AS (
ii inventory_item,
size integer
);
or:
CREATE TABLE inventory_item2 (
LIKE inventory_item,
size integer
);
and that will automatically create the type.
Regards,
Jeff Davis
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера