pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: TJ O'Donnell <tjo@acm.org>
To: PostgreSQL - SQL <pgsql-sql@postgresql.org>
Subject: Create Table xtest (like xtype)
Date: Wed, 06 Feb 2008 11:40:30 -0800
Message-ID: <47AA0D2E.5040303@acm.org> (raw)

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



view thread (3+ messages)  latest in thread

Message-ID: <47AA0D2E.5040303@acm.org>
Permalink:  ../47AA0D2E.5040303@acm.org/
Also on:    postgresql.org/message-id/47AA0D2E.5040303@acm.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tjo@acm.org
  Subject: Re: Create Table xtest (like xtype)
  In-Reply-To: <47AA0D2E.5040303@acm.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox