"Gregory Stark" <[EMAIL PROTECTED]> writes:

> "Jeremy Drake" <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?


Reply via email to