Re: pg_dump: Add ExecuteSqlCopy and simplify ExecuteSqlQuery

From: Andreas Karlsson <andreas(at)proxel(dot)se>
To: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: pg_dump: Add ExecuteSqlCopy and simplify ExecuteSqlQuery
Date: 2026-01-03 15:32:19
Message-ID: c14154a4-063d-4389-ba6e-cab097c5077d@proxel.se
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/16/25 10:38 PM, Corey Huinker wrote:
> Of the current 84 calls to the convenience routine ExecuteSqlQuery(), 83
> of them are regular queries which expect a result of PGRES_TUPLES_OK.
> The other one expects PGRES_COPY_OUT. So it seems worthwhile to remove
> the parameter entirely and assume the caller wants PGRES_TUPLES_OK. For
> the one exception, ExecuteSqlCopy() is created, though one could argue
> that we might just do without the convenience routine altogether. Patch
> attached.

The patch looks fine and if I had written it from scratch I would
probably have done it like in the patch but I do not think the code
churn is worth what to me feels like a minuscule improvement.

What does others think?

Andreas

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nicolas Adenis-Lamarre 2026-01-03 15:54:20 Re: Convert coalesce to or/and
Previous Message Andrey Borodin 2026-01-03 14:51:43 Re: confusing results from pg_get_replication_slots()