Create Table xtest (like xtype)

Поиск
Список
Период
Сортировка
От TJ O'Donnell
Тема Create Table xtest (like xtype)
Дата
Msg-id 47AA0D2E.5040303@acm.org
обсуждение исходный текст
Ответы Re: Create Table xtest (like xtype)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
I know I  can create a table using names and types from an existing
table.

Create Table xtable (a Integer, b Text);
Create Table xtest (Like xtable);
This works just fine.

I want to create a table having the same column names and types as
an existing new datatype.

Create Type xtype As (a Integer, b Text);
Create Table xtest (Like xtype);
ERROR:  "xtype" is a composite type
Is that possible some other way?

TJ O'Donnell
http://www.gnova.com


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

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Re: undefined relations in pg_locks
Следующее
От: Steve Midgley
Дата:
Сообщение: Columns view? (Finding column names for a table)