Re: Custom type's modifiers - Mailing list pgsql-hackers

From Marthin Laubscher
Subject Re: Custom type's modifiers
Date
Msg-id 0390C71D-93CD-4CE5-A2E6-324076967BAC@lobeshare.co.za
Whole thread Raw
In response to Re: Custom type's modifiers  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Custom type's modifiers
Re: Custom type's modifiers
List 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 by date:

Previous
From: "Simone G."
Date:
Subject: Re: ClientRead on ROLLABACK
Next
From: "David G. Johnston"
Date:
Subject: Re: Custom type's modifiers