public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Sebastien FLAESCH <[email protected]>
Cc: [email protected]
Subject: Re: Type scale returned by PQfmod() 65531 for time/timestamp output parameter?
Date: Wed, 21 Feb 2018 13:36:30 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
Sebastien FLAESCH <[email protected]> writes:
> On 02/20/2018 03:39 PM, Tom Lane wrote:
>> Like I said before, it's datatype-specific and you need to look at the
>> typmodin/typmodout support functions for each type to see what they do.
> Are you suggesting me to dig into the PostgreSQL server sources / internals?
Yup.
> Any starting point I should look at?
regression=# select distinct typmodout from pg_type where typmodout != 0;
typmodout
----------------------
intervaltypmodout
timestamptypmodout
timestamptztypmodout
timetypmodout
timetztypmodout
bpchartypmodout
varchartypmodout
numerictypmodout
bittypmodout
varbittypmodout
(10 rows)
I think all of those are under src/backend/utils/adt/ in the sources.
Briefly their charter is to produce the textual representation of a
typmod value for the data type, or an empty string if there's no typmod
constraint. Although in principle code outside the datatype shouldn't
assume anything at all about the encoding of typmod, there's a widespread
assumption that all negative values (not just -1) mean "no constraint".
regards, tom lane
view thread (11+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Type scale returned by PQfmod() 65531 for time/timestamp output parameter?
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox