Re: Writing values to relation using bytearray ...

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Writing values to relation using bytearray ...
Дата
Msg-id 4136ffa0903060401i26746f42i2e79c9ce1bb22479@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Writing values to relation using bytearray ...  (Kedar Potdar <kedar.potdar@gmail.com>)
Ответы Re: Writing values to relation using bytearray ...
Список pgsql-hackers
On Fri, Mar 6, 2009 at 11:41 AM, Kedar Potdar <kedar.potdar@gmail.com> wrote:
> Thanks Greg, for showing interest.
>
> The problem here is I need to store values of different types into bytearray
> column of relation.

Oh, hm. I think you need to look at typlen instead of typbyval.

But you have an additional problem for typbyval types: the pointer to
Datum isn't necessarily pointing at the right bytes. I think you have
to use the GET_[1248]_BYTES macros depending on typlen. There may be a
helper function for this but I don't know of one.


-- 
greg


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

Предыдущее
От: Bernd Helmle
Дата:
Сообщение: Re: Validating problem in the isn contrib module
Следующее
От: Andreas 'ads' Scherbaum
Дата:
Сообщение: Re: Validating problem in the isn contrib module