to_typemod(type_name) information function - Mailing list pgsql-hackers

From Sophie Herold
Subject to_typemod(type_name) information function
Date
Msg-id 225f6658-c531-7479-ba59-edf524f957d7@hemio.de
Whole thread Raw
Responses Re: to_typemod(type_name) information function  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

I need to test a (user) given column type name, with one in the database
for equality. To this end, I have to do some kind of normalization (e.g.
'timestamptz(2)' to 'timestamp (2) with time zone'.)

Comparing the name alone is possible with to_regtype(type_name) or
::regtype. However, this ignores the 'typemod'.

I want to suggest a to_typemod(type_name) function which, combined with
to_regtype, would allow to decompose (and reconstruct) a type name
completely.

Best,
Sophie


pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Treating work_mem as a shared resource (Was: Parallel Hash take II)
Next
From: "Ian Corson"
Date:
Subject: RE: unsubscribe