Re: Fwd: Row description Metadata information

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Aleksei Ivanov <iv(dot)alekseii(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fwd: Row description Metadata information
Date: 2021-03-09 18:32:27
Message-ID: 20210309183227.GF26575@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 15, 2021 at 05:25:55PM -0800, Aleksei Ivanov wrote:
> Not sure that previous email was sent correctly. If it was duplicated, sorry
> for the inconvenience.
>
> Hi, hackers,
>
> I have one question related to returned information in the row description for
> prepared statement.
>
> For example Select $1 * 2 and then Bind 1.6 to it.
> The returned result is correct and equal to 3.2, but type modifier in the row
> description is equal to -1, which is not correct.
>
> Does someone know where this modifier is calculated? Is this a bug or intention
> behavior?

Postgres can't always propogate the type modifier for all expresions, so
it basically doesn't even try. For example, the modifier for || would
be very complex.

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

The usefulness of a cup is in its emptiness, Bruce Lee

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2021-03-09 19:09:37 Re: Online checksums patch - once again
Previous Message Bruce Momjian 2021-03-09 18:12:06 Re: Online checksums patch - once again