Re: index naming conventions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joseph Shraibman <jks(at)selectacast(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: index naming conventions
Date: 2001-09-06 05:07:12
Message-ID: 29939.999752832@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joseph Shraibman <jks(at)selectacast(dot)net> writes:
> playpen=# create table jm(
> playpen(# jid int NOT NULL,
> playpen(# mid int ,
> playpen(# UNIQUE(jid, mid)
> playpen(# );
> NOTICE: CREATE TABLE/UNIQUE will create implicit index 'jm_jid_key' for table 'jm'
> CREATE

> Why isn't the index created called 'jm_jid_mid_key' ?

Laziness, mainly. There's a subroutine in the parser that's responsible
for forming these names and doing truncation if they are too long. It
only handles three name components (table, field, and "_key" suffix) at
the moment. Feel free to submit a patch that makes it smarter...

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Taher H. Haveliwala 2001-09-06 05:36:05 storing large graphs in postgres
Previous Message Stephan Szabo 2001-09-06 04:54:11 Re: FOREIGN KEY: MATCH FULL