Re: user defined type

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: user defined type
Дата
Msg-id 20041110183005.GA17876@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: user defined type  (Kjetil Haaland <kjetil.haaland@student.uib.no>)
Ответы Re: user defined type  (Kjetil Haaland <kjetil.haaland@student.uib.no>)
Список pgsql-novice
On Wed, Nov 10, 2004 at 02:37:49PM +0100, Kjetil Haaland wrote:

> Is there anyway to have two or more strings in one type or do i have to save
> them both in one string?

PostgreSQL needs all the data in a single buffer.  If you want to
work with multiple variable-length fields, then you could define a
structure that's easy for your code to work with and serialize it
before returning it to PostgreSQL, or one that uses pointers that
point to the correct places in the buffer.  Your alignres_out()
function will need to reverse that effect so it can work with the
data that PostgreSQL passes it.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

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

Предыдущее
От: Kjetil Haaland
Дата:
Сообщение: Re: user defined type
Следующее
От: Sean Davis
Дата:
Сообщение: ER Diagrams