Re: Type scale returned by PQfmod() 65531 for time/timestamp outputparameter?

Поиск
Список
Период
Сортировка
От Sebastien FLAESCH
Тема Re: Type scale returned by PQfmod() 65531 for time/timestamp outputparameter?
Дата
Msg-id a6fd2b01-defd-5a26-d9e8-9a31537fa970@4js.com
обсуждение исходный текст
Ответ на Re: Type scale returned by PQfmod() 65531 for time/timestamp output parameter?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-interfaces
On 02/21/2018 07:36 PM, Tom Lane wrote:
> Sebastien FLAESCH <sf@4js.com> 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
> 

OK Thanks!
Seb


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Type scale returned by PQfmod() 65531 for time/timestamp output parameter?
Следующее
От: Ashutosh Sharma
Дата:
Сообщение: Host variables in ecpg