Using a table's data type...
От | murphy pope |
---|---|
Тема | Using a table's data type... |
Дата | |
Msg-id | F172Trn1iUCT0RVn9xO0000a6ea@hotmail.com обсуждение исходный текст |
Ответы |
Re: Using a table's data type...
|
Список | pgsql-general |
When I create a new table, I have also created a new data type (whose name is the same as the name of the table). For example: CREATE TABLE customer( customer_id integer, customer_name varchar ); creates a new data type named 'customer'. I can now create another table that includes a column whose type is 'customer': CREATE TABLE customer_archive( customer_info customer, mod_date timestamp ); Now, a couple of really basic questions. 1) Is there a way to insert a row into this table? 2) Since customer_archive.customer_info is defined to be a composite column, how would I address each member? 3) Is this just a really dumb idea on my part? Maybe the fact that I can use a table's type to define a column is just accidental and I really shouldn't do that. Any opinions, answers, or documentation references are appreciated. Thanks. -- Murphy _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com
В списке pgsql-general по дате отправления: