Non-colliding auto generated names

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Non-colliding auto generated names
Date: 2003-02-17 05:26:23
Message-ID: 026901c2d645$1c346b00$6500a8c0@fhp.internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

This patch makes all forms of autogenerated unique, primary key and sequence
names avoid collisions. (Well, as much as you can do without "locking" your
chosen name).

This addresses a long standing annoyance I experience whenever I rename a
table to table_old and then try to create a table with the same name. It
also addresses a concern raised at linux.conf.au.

I suggest that someone inspect the patch to determine if my "overloading" of
CreateIndexName is appropriate (for sequences, etc.)

All regression tests pass. The attached SQL script will run fine under the
patch, whereas before it would have failed miserably.

Chris

Attachment Content-Type Size
autonames.txt text/plain 7.7 KB
nametest.sql application/octet-stream 1.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ryan Bradetich 2003-02-17 06:12:28 Questions about indexes?
Previous Message Christopher Kings-Lynne 2003-02-17 05:07:31 Re: Hard problem with concurrency

Browse pgsql-patches by date

  From Date Subject
Next Message Chisel Wright 2003-02-17 11:34:13 postgres error reporting
Previous Message Kevin Brown 2003-02-17 03:54:07 Re: stats_command_string default?