Re: patch adding new regexp functions

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: patch adding new regexp functions
Дата
Msg-id 87k5xahi91.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: patch adding new regexp functions  (Gregory Stark <stark@enterprisedb.com>)
Ответы Re: patch adding new regexp functions  (Jeremy Drake <pgsql@jdrake.com>)
Список pgsql-patches
"Gregory Stark" <stark@enterprisedb.com> writes:

> "Jeremy Drake" <pgsql@jdrake.com> writes:
>
>> BTW, should I be calling get_typlenbyvalalign on TEXTOID or are there macros
>> for those also?
>
> Hardcoding -1 for typlen of varlenas is one of the few (the only?) magic
> constants used throughout the source code. I'm surprised there isn't a macro
> for it though.
>
> Do you need the alignment? If so I want to check the code against the packed
> varlena patch. Just in case.

Ah, it's just to construct an array, that's not a concern at all. And you're
detoasting the text data types before using or storing them so that's fine.


The only thing I would say is that this should maybe be a TextGetDatum() just
for code hygiene. It should be exactly equivalent though:

+     PointerGetDatum(matchctx->orig_str),

--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com

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

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Re: patch adding new regexp functions
Следующее
От: Tom Lane
Дата:
Сообщение: Re: patch adding new regexp functions