public inbox for [email protected]
help / color / mirror / Atom feedFrom: M Tarkeshwar Rao <[email protected]>
To: [email protected] <[email protected]>
Subject: After upgrading libpq, the same function(PQftype) call returns a different OID
Date: Sat, 15 Mar 2025 18:53:08 +0000
Message-ID: <PAWPR07MB1009569596278D85AC691BBF4AEDD2@PAWPR07MB10095.eurprd07.prod.outlook.com> (raw)
Hi all,
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.
What could be causing this change, and how can we resolve it?"
Postgres Version(upgraded from 11.18 to 13.20)
Example:
Before the libpq Upgrade (Expected Behavior)
Let's say your PostgreSQL database has a table:
CREATE TABLE example (
id SERIAL PRIMARY KEY,
filetime TIMESTAMP(3) WITHOUT TIME ZONE
);
In the old version of libpq, calling PQftype on the filetime column returns:
Oid filetime_oid = PQftype(res, 1); // Assuming 'filetime' is at index 1
printf("Filetime column OID: %u\n", filetime_oid);
Expected output (before upgrade):
Filetime column OID: 1114
After the libpq Upgrade (Unexpected Behavior)
After upgrading libpq, the same function call returns a different OID, such as 123456.
What could be the reason?
Regards
Tarkeshwar
view thread (2+ messages) latest in thread
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]
Subject: Re: After upgrading libpq, the same function(PQftype) call returns a different OID
In-Reply-To: <PAWPR07MB1009569596278D85AC691BBF4AEDD2@PAWPR07MB10095.eurprd07.prod.outlook.com>
* 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