Re: Custom type's modifiers
От | Marthin Laubscher |
---|---|
Тема | Re: Custom type's modifiers |
Дата | |
Msg-id | 0390C71D-93CD-4CE5-A2E6-324076967BAC@lobeshare.co.za обсуждение исходный текст |
Ответ на | Re: Custom type's modifiers (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Custom type's modifiers
Re: Custom type's modifiers |
Список | pgsql-hackers |
On 2024/06/27, 17:06, "Tom Lane" <tgl@sss.pgh.pa.us <mailto:tgl@sss.pgh.pa.us>> wrote: > You can't. Whatever info is needed by operations on the type had better be embedded in the value. OK, thanks, that's clear and easy enough. I'll ensure the the third parameter to the input function is embedded in my opaquevalue. I don't see another function getting passed the value so I'd assume that (unless I return a MyType value from one of my ownfunctions which would follow its internal logic to determine which type modifiers to use) the only way a MyType can getan initial value is via the input function. If the type is in a table column the input function would be called with thedefault value specified in external format if a value isn't specified during insert, but either way it would always originatefrom the eternal format. I suppose when a cast is involved it goes via the external format as well, right? Are those sound assumptions to make or am I still way off base here? --- Thanks for your time - Marthin Laubscher
В списке pgsql-hackers по дате отправления: