public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: M Tarkeshwar Rao <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: After upgrading libpq, the same function(PQftype) call returns a different OID
Date: Sat, 15 Mar 2025 15:02:08 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <PAWPR07MB1009569596278D85AC691BBF4AEDD2@PAWPR07MB10095.eurprd07.prod.outlook.com>
References: <PAWPR07MB1009569596278D85AC691BBF4AEDD2@PAWPR07MB10095.eurprd07.prod.outlook.com>

M Tarkeshwar Rao <[email protected]> writes:
> We are using PostgreSQL libpq in our application. The code worked fine for the past four years, but after upgrading the library, the function PQftype is returning unexpected values for some columns.
> Specifically, the issue occurs with a column of type timestamp(3) without time zone.

The OID of type timestamp has not changed.  Perhaps you are now
querying some other table.  I'd suggest looking into pg_type to
find out what type is represented by the OID you're now getting,
and then searching pg_attribute to see what's using that.

select typname from pg_type where oid = 123456;

select attrelid::regclass, attname from pg_attribute where atttypid = 123456;

Also, if you really do mean that you changed only libpq and
nothing about the server side, I'd have to guess that you're
connecting to some other database than before.  That would be
surprising, but with zero details it's hard to debug.

			regards, tom lane






view thread (2+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: After upgrading libpq, the same function(PQftype) call returns a different OID
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox