Re: adddepend and partial indexes - Mailing list pgsql-general

From Stephan Szabo
Subject Re: adddepend and partial indexes
Date
Msg-id 20030617074151.J95725-100000@megazone23.bigpanda.com
Whole thread Raw
In response to adddepend and partial indexes  ("SZŰCS Gábor" <surrano@mailbox.hu>)
Responses Re: adddepend and partial indexes  (Bruno Wolff III <bruno@wolff.to>)
Re: adddepend and partial indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Tue, 17 Jun 2003, [iso-8859-2] SZ�CS G�bor wrote:

> Dear Fellows,
>
> Couldn't find a list on adddepend, nor this problem via Google nor search at
> postgresql.org, so here it goes.
>
> Adddepend seems to have problem with partial indexes. Below is an example.
> I can see the bugous regular subst in the perl script and I'd probably be
> able to correct it, but I don't know how to use ALTER TABLE to add a partial
> UNIQUE constraint (or shouldn't I add it at all?)

AFAIK there's no such thing as a partial unique constraint so the index
should probably just be left alone.

> Also, I can't see the meaning of the second regular subst (as shown below).

Hmm, I'd have guessed it was to take off index opclass information, but it
doesn't seem to do that (and doing so seems incorrect if its an index
using a non-default opclass).

> ------------------------------- 7.3.2
> adddepend -------------------------------
> ------------------------------- Func:
> findUniqueConstraints -------------------
> # ...
>     # Fetch vars
>     my $constraint_name = $row->{'index_name'};
>     my $table = $row->{'table_name'};
>     my $columns = $row->{'constraint_definition'};
>
>     # Extract the columns from the index definition
>     $columns =~ s|.*\(([^\)]+)\).*|$1|g;
>     $columns =~ s|([^\s]+)[^\s]+_ops|$1|g;


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Sort memory not being released
Next
From: Jonathan Bartlett
Date:
Subject: Re: postgreSQL on NAS/SAN?