Re: Doubt regarding query parameter metadata - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: Doubt regarding query parameter metadata
Date
Msg-id 3457548.1617300420@sss.pgh.pa.us
Whole thread Raw
In response to Doubt regarding query parameter metadata  (Giovani Garcia <giovani.garcia@protonmail.com>)
List pgsql-interfaces
Giovani Garcia <giovani.garcia@protonmail.com> writes:
>> Is that theexact query you're issuing?

> Yes, that's the exact query.

Oh ... after actually trying the program you sent, I realized you are
looking at the wrong thing, or at least asking about something other
than what I thought you were asking about.  You are querying
PQparamtype(), that is, the type of the symbol $1, not the type of
the returned column "key" which is what I thought you meant.  As I
explained before, varchar has no operators, particularly not equality;
so "value = $1" is interpreted using the text = text operator, making
it effectively "value::text = $1::text".  Thus $1 is resolved as type
text.

            regards, tom lane



pgsql-interfaces by date:

Previous
From: Giovani Garcia
Date:
Subject: Re: Doubt regarding query parameter metadata
Next
From: "Greg Sabino Mullane"
Date:
Subject: DBD::Pg version 3.15.0 released