Type modifier parameter of input function

From: Michael Schneider <mschneid(at)mpi-bremen(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Type modifier parameter of input function
Date: 2012-07-13 16:08:16
Message-ID: 500047F0.9050005@mpi-bremen.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-07-13 17:50:28 Re: Type modifier parameter of input function
Previous Message Ronan Dunklau 2012-07-13 16:04:08 Query planning, nested loops and FDW.