to_typemod(type_name) information function

From: Sophie Herold <sophie_h(at)hemio(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: to_typemod(type_name) information function
Date: 2017-11-18 00:26:28
Message-ID: 225f6658-c531-7479-ba59-edf524f957d7@hemio.de
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ian Corson 2017-11-18 01:04:34 RE: unsubscribe
Previous Message Peter Geoghegan 2017-11-18 00:09:45 Re: Treating work_mem as a shared resource (Was: Parallel Hash take II)