Re: Recently added typedef "string" is a horrid idea

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Recently added typedef "string" is a horrid idea
Дата
Msg-id CAM3SWZR2d=3WEpeiKCs_xo25df338kbs=s+wPLFdWb=0Gm-e6A@mail.gmail.com
обсуждение исходный текст
Ответ на Recently added typedef "string" is a horrid idea  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Recently added typedef "string" is a horrid idea  (Robert Haas <robertmhaas@gmail.com>)
Re: Recently added typedef "string" is a horrid idea  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sat, Feb 6, 2016 at 2:11 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Remember that the effects of typedef names are
> *global*, so far as pgindent is concerned; not only varlena.c will
> be affected.

I'll remember that in the future.

> Please rename this typedef with some less-generic name.  Probably
> some of the other identifiers added in the same commit should be
> adjusted to match.

I suggest "VarString". All the text SortSupport routines were renamed
to match a pattern of "varstr.*" as part of the commit you mention.

The implication that was intended by the rename is that the relevant
routines are responsible for about the same cases as the cases handled
by varstr_cmp(). I tend to mostly think of the text type when looking
at varstr_cmp(), but it's also used by jsonb, for example, as well as
char(n). It has a broader purpose; it is used by collatable types
generally. So, a rename to "VarString" probably makes sense,
independent of your pgindent concern.

If this sounds like a good idea, I'll produce a patch soon.

-- 
Peter Geoghegan



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

Предыдущее
От: Ashutosh Bapat
Дата:
Сообщение: Re: postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Idle In Transaction Session Timeout, revived