| От | Tom Lane |
|---|---|
| Тема | Re: User defined type with text* field |
| Дата | |
| Msg-id | 4603.993913377@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | User defined type with text* field (Ken K <kenmail@telocity.com>) |
| Список | pgsql-general |
Ken K <kenmail@telocity.com> writes:
> I am trying to create a user defined type with 2 fields
> in it, a text* and an Oid. I am not sure what size to
> use in the create type command. When I try variable
> the back end core dumps. Are there any examples for
> doing this sort of thing? Is it even doable?
You can't use any kind of pointer in a datatype --- what is it going to
point to? There's nothing it could point at that might live as long as
the datavalue on disk will.
You could embed a TEXT value into a larger varlena value, say
<total length word>
Oid
<text value here, beginning with its own length word>
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера