Re: Converting non-null unique idx to pkey

From: "Ed L(dot)" <pgsql(at)bluepolka(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Postgres-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Converting non-null unique idx to pkey
Date: 2007-08-22 17:07:40
Message-ID: 200708221107.41418.pgsql@bluepolka.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday 21 August 2007 11:40 pm, Tom Lane wrote:
> "Ed L." <pgsql(at)bluepolka(dot)net> writes:
> > Are there
> > are any known or obvious gotchas associated with
> > transforming a unique index on a non null column into a
> > primary key via this sql?
> >
> > update pg_index
> > set indisprimary = 't'
> > where indexrelid = <my non-null unique index oid>
>
> The problem with that is there won't be any pg_constraint
> entry, nor any pg_depend entries linking to/from the
> constraint...

Thanks. Sounds messy enough, I'll try another route.

Ed

In response to

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2007-08-22 17:22:12 Re: "out of memory" error
Previous Message Christian Schröder 2007-08-22 17:07:20 "out of memory" error