Re: Typmod associated with multi-row VALUES constructs - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: Typmod associated with multi-row VALUES constructs
Date
Msg-id CAMsr+YHk6Zmisx69nfq4bu0Cx4gOVYJyRQ0FFdH9tGU1Tn1tEg@mail.gmail.com
Whole thread Raw
In response to Re: Typmod associated with multi-row VALUES constructs  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers
On 6 December 2016 at 04:52, David G. Johnston
<david.g.johnston@gmail.com> wrote:

> Can we be precise enough to perform #2 if the top-level (or immediate
> parent) command is an INSERT - the existing table is going to enforce its
> own typemod anyway, otherwise go with #1?

We already routinely throw away typmod information in other places,
and can only truly rely on it when working directly with data in
tables. So it sounds sensible to me.

I see semi-regular complaints about this from JDBC users, who want to
be able to know things like "number of digits in this numeric" and
"can this column be null" even through various projections and
transformations of results. But I don't think your suggested change
will make the existing situation any worse.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: Typmod associated with multi-row VALUES constructs
Next
From: "David G. Johnston"
Date:
Subject: Re: Typmod associated with multi-row VALUES constructs