Re: updated WIP: arrays of composites - Mailing list pgsql-patches

From Andrew Dunstan
Subject Re: updated WIP: arrays of composites
Date
Msg-id 4644FE6C.80500@dunslane.net
Whole thread Raw
In response to Re: updated WIP: arrays of composites  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: updated WIP: arrays of composites
List pgsql-patches

Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>
>> Tom Lane wrote:
>>
>>> Auto-rename.  I'm working on a patch now, and it doesn't look like it'll
>>> be too awful.  Will post it for comments when it's working.
>>>
>
>
>> Ok, cool. I look forward to it.
>>
>
> Here's a bare-bones patch (no doc or regression tests).  Seems to work.
> Anyone think this is too ugly a way to proceed?
>
>
>

Summarising the behaviour as I understand it:

. if you never name a type/table with a name beginning with underscore,
behaviour is as expected - type foo gets array type _foo
. if you create a type foo and then create a type _foo, the array type
for foo will first be renamed to __foo, and the new array type for _foo
will be ___foo
. if you create type _foo and then create type foo, the corresponding
array types will be __foo and ___foo as per my patch, with no renaming
required.

I think I like it. Certainly seems to get round the ordering problem nicely.

cheers

andrew


pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: [GENERAL] dropping role w/dependent objects
Next
From: Tom Lane
Date:
Subject: Re: updated WIP: arrays of composites