Re: After upgrading libpq, the same function(PQftype) call returns a different OID

2025-03-15 Thread Tom Lane
M Tarkeshwar Rao 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

After upgrading libpq, the same function(PQftype) call returns a different OID

2025-03-15 Thread M Tarkeshwar Rao
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. Wh

Re: The logic behind comparing generic vs. custom plan costs

2025-03-15 Thread Tom Lane
Justin Blank writes: > My idea had been that even if the custom plans average higher cost > than the generic plan, it is still worth considering custom plans. If > 1 time in 5, the custom plan is 10% of the cost of the generic plan, > it doesn't matter if the average custom plan is worse, you shou

Re: The logic behind comparing generic vs. custom plan costs

2025-03-15 Thread David G. Johnston
On Sat, Mar 15, 2025 at 10:42 AM Justin Blank wrote: > My idea had been that even if the custom plans average higher cost > than the generic plan, it is still worth considering custom plans. If > 1 time in 5, the custom plan is 10% of the cost of the generic plan, > it doesn't matter if the avera

The logic behind comparing generic vs. custom plan costs

2025-03-15 Thread Justin Blank
I've been looking into the way that postgres decides whether to use a custom or generic plan. I believe I understand how, but I have confused myself about the why. In plancache.c, the code always executes a custom plan for the first five iterations, and afterwards, it compares the average cost of

Re: Duplicate Key Values

2025-03-15 Thread mark bradley
Adrian & Ron, Thank you for your assistance. Best regards, Mark Brady amazon.com/author/markjbrady From: Adrian Klaver Sent: Thursday, March 13, 2025 1:03 PM To: mark bradley ; Ron Johnson ; pgsql-general Subject: Re: Dupli

Creating files with testdata

2025-03-15 Thread H
I am developing a complex multi-tenant application in postgresql 16 in Linux. During the development I would like to be able to enter test data into various related tables at any given time for testing purposes. While this can certainly be accomplished by predefined CTE INSERT statements in an

Re: [EXTERNAL] Re: Asking for OK for a nasty trick to resolve PG CVE-2025-1094 i

2025-03-15 Thread Abraham, Danny
Explanation. We have hundreds of pg servers (mainly linux). App is 7×24. We think that patching the server to 15.12.will cost about 30 times more compared to patching the pg client ( mainly qa effort). The app working fine using [libpq, psql] on both Linux as well as Windows. Would love to hear yo

Re: Creating files with testdata

2025-03-15 Thread H
On March 10, 2025 5:09:46 PM GMT-04:00, H wrote: >On March 10, 2025 3:22:41 PM GMT-04:00, Francisco Olarte > wrote: >>On Mon, 10 Mar 2025 at 19:17, H wrote: >>... >>> After entering my test data into the markdown file for the given >test >>scenario, I would then run an awk script or similar to cr