Type modifier parameter of input function - Mailing list pgsql-hackers

From Michael Schneider
Subject Type modifier parameter of input function
Date
Msg-id 500047F0.9050005@mpi-bremen.de
Whole thread Raw
Responses Re: Type modifier parameter of input function  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

whenever pg calls my input function, the type modifier parameter is 
ALWAYS (-1). If I specify a type modifier like

SELECT 'Hello World!'::my_string_type(MODIFIER1,MODIFIER2);

then pg:
1. calls the my_string_type-typmod_in function, and gets the correct result
2. calls the my_string_type-input function with type modifier parameter (-1)
3. calls the CAST(my_string_type AS my_string_type) function with the 
correct type modifier returned by the typmod_in function and the 
my_string_type pointer returned by the input function.

How can I convince pg to call the input function with the correct type 
modifier?

Thanks in advance

Regards

Michael






pgsql-hackers by date:

Previous
From: Ronan Dunklau
Date:
Subject: Query planning, nested loops and FDW.
Next
From: Tom Lane
Date:
Subject: Re: Type modifier parameter of input function