Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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: nametest.sql
Description: application/octet-stream (1.4 KB)
Attachment: autonames.txt
Description: text/plain (7.7 KB)

Responses

pgsql-hackers by date

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

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group