Re: Seeking quick way to clone a row, but give it a new pk.

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Seeking quick way to clone a row, but give it a new pk.
Date: 2007-02-08 16:18:26
Message-ID: 58d5b57212154308c59c84976e153c53@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

> I need to create some nearly identical copies of rows in
> a complicated table.
>
> Is there a handy syntax that would let me copy a existing row,
> but get a new primary key for the copy?

http://people.planetpostgresql.org/greg/index.php?/archives/45-Making-a-copy-of-a-unique-row.html

- --
Greg Sabino Mullane greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200702081114
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iD8DBQFFy0xcvJuQZxSWSsgRA8vFAJsHMFhngWGCSSi8okO9j9H0++hajgCgrUz+
aKTnhaHuQHv1qetAmPt/ufM=
=HDF8
-----END PGP SIGNATURE-----

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Ezequias Rodrigues da Rocha 2007-02-08 16:50:05 Open a Transaction
Previous Message Tom Lane 2007-02-08 15:59:16 Re: Odd PL/PgSQL Error -- relation "X" does not exist when using index expression