Re: Doubt regarding query parameter metadata

From: Giovani Garcia <giovani(dot)garcia(at)protonmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-interfaces(at)lists(dot)postgresql(dot)org" <pgsql-interfaces(at)lists(dot)postgresql(dot)org>
Subject: Re: Doubt regarding query parameter metadata
Date: 2021-04-01 15:30:05
Message-ID: nMumDcadzPE6aT81ly0k9zB6WOJygh4VWyFxmkMthwpZnH7xJcwwOGLZyfFQh6Hassdt3PKBiMmjOSh26X81prUXfEaWRYT1ukI8QBOCfxE=@protonmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Hello Tom,

Thanks for taking the time.

> Is that theexact query you're issuing?
Yes, that's the exact query.
You can reproduce the issue by creating the table and running the C program from my previous e-mail.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, 1 April 2021 11:14, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Giovani Garcia giovani(dot)garcia(at)protonmail(dot)com writes:
>
> > The issue I'm finding is that the Oid returned for a VARCHAR column is TEXTOID (25) instead of VARCHAROID (1043).
>
> This isn't hugely surprising in general. varchar has no operations
> of its own; PG treats it as sort of a domain over text. So if you
> do anything at all to a varchar column, it'd be quite likely for
> the column to be implicitly coerced to text within the query.
>
> > Now, when I run the following program (simplified for brevity),
>
> > "SELECT key FROM oid_test WHERE value = $1",
>
> Is that theexact query you're issuing? I don't see anything
> in that that would cause a coercion, but maybe you left out some
> relevant detail.
>
> regards, tom lane

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2021-04-01 18:07:00 Re: Doubt regarding query parameter metadata
Previous Message Tom Lane 2021-04-01 14:14:20 Re: Doubt regarding query parameter metadata