pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ramiro Alba <ramiro@labtie.mmt.upc.es>
To: pgsql-sql@postgresql.org
Subject: How to clone a table to an empty one
Date: Sat, 17 Feb 2001 15:55:36 +0100
Message-ID: <3A8E90E7.4BFF6C1@labtie.mmt.upc.es> (raw)

Hello everyone:

I would need to create an exact reproduction of a certain table
(excluding data) converving primary key attributes and so on.  I tried
with:
CREATE TABLE AS ...
I also tried :

SELECT *
INTO TABLE ....

In both cases, it does not maintain the primary key atribute that I need
in order to edit the cloned table with StarBase using the unixODBC
driver. The table reads ok, but it is read only due to the fact that
I mention.
Anyone knows the solution?

Regards

--
Ramiro Alba
Laboratori de Termotecnia i Energetica

Departament de Maquines i Motors Termics
ETS d'Enginyers Industrials de Terrassa

C/Colom 11

Tf: 34 - 93 739 86 46
Fax: 34 - 93 739 81 01

e-mail: ramiro@labtie.mmt.upc.es






view thread (2+ messages)  latest in thread

Message-ID: <3A8E90E7.4BFF6C1@labtie.mmt.upc.es>
Permalink:  ../3A8E90E7.4BFF6C1@labtie.mmt.upc.es/
Also on:    postgresql.org/message-id/3A8E90E7.4BFF6C1@labtie.mmt.upc.es

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: ramiro@labtie.mmt.upc.es
  Subject: Re: How to clone a table to an empty one
  In-Reply-To: <3A8E90E7.4BFF6C1@labtie.mmt.upc.es>
  References: <3A8E90E7.4BFF6C1@labtie.mmt.upc.es>

* 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