Re: array type name mangling

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: array type name mangling
Дата
Msg-id 463CA1AA.5040909@dunslane.net
обсуждение исходный текст
Ответ на Re: array type name mangling  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: array type name mangling  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers

Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>   
>> In connection with completing David Fetter's array of composites patch, 
>> I am looking at doing some better name mangling for array types as 
>> recently discussed. What I'm thinking of is prepending one or more 
>> underscores to the type name up to some limit (NAMEDATALEN / 2 ?) and if 
>> necessary truncating the result, and then looking to see if there is a 
>> name clash. That would, I hope, enable us to get rid of all the places 
>> where we require names to be no more than NAMEDATALEN - 2 chars. Does 
>> that seem like a reasonable approach? Will it break anything, i.e., is 
>> there somewhere that has assumes the array type for foo will be called 
>> _foo  rather than ___foo ?
>>     
>
> makeArrayTypeName and users thereof.  Or are you going to extend pg_type
> to have a direct link?
>
>             
>   

I am going to change makeArrayTypeName() to do the mangling. Its users 
will need to pass in a namespace as well as a typename so it can do the 
checking.

There's a direct link via typelem - do you think we need a reverse mapping?

cheers

andrew


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Cache plan invalidation
Следующее
От: Neil Conway
Дата:
Сообщение: Re: Integer datetimes