Search Postgresql Archives

Re: Converting non-null unique idx to pkey

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 21 August 2007 11:40 pm, Tom Lane wrote:
> "Ed L." <pgsql@xxxxxxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux