Re: Custom type's modifiers
| От | Tom Lane |
|---|---|
| Тема | Re: Custom type's modifiers |
| Дата | |
| Msg-id | 1734255.1719500787@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Custom type's modifiers (Marthin Laubscher <postgres@lobeshare.co.za>) |
| Ответы |
Re: Custom type's modifiers
|
| Список | pgsql-hackers |
Marthin Laubscher <postgres@lobeshare.co.za> writes:
> But now I need to (re)define MyType to support type modifiers (e.g. MyType(1,14,18)) and I got that done using CREATE
TYPE’sTYPMOD_IN and TYPMOD_OUT parameters resulting in the correct packed value getting stored in pg_attribute when I
definea column of that type.
OK ...
> But when I pass a MyType value to a function defined in my C extension how would I access the type modifier value for
theargument which could have been drawn from the catalog or the result of a cast.
You can't. Whatever info is needed by operations on the type had
better be embedded in the value.
regards, tom lane
В списке pgsql-hackers по дате отправления: