Making CopyFromStateData not internal anymore

From: Jelte Fennema <postgres(at)jeltef(dot)nl>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Making CopyFromStateData not internal anymore
Date: 2023-02-13 11:27:09
Message-ID: CAGECzQQhNbjBm=jog3uXgNP-0nV2DKTuSoJHJX-K995fWB-pFQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

For Citus we'd like to hook into the way that GENERATED AS IDENTITY
generates the next value. The way we had in mind was to replace
T_NextValueExpr with a function call node. But doing that same for
COPY seems only possible by manually changing the defexprs array of
the CopyFromState. Sadly CopyFromStateData is in an internal header so
that seems dangerous to do, since the struct definition might change
across minor versions.
However, it seems that the only time this was actually done in the
last 5 years was in 8dc49a8934de023c08890035d96916994bd9b297

What do you think about making CopyFromStateData its definition public?

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Jones 2023-02-13 12:15:57 Re: [PATCH] Add pretty-printed XML output option
Previous Message David Rowley 2023-02-13 11:16:27 Re: Can we do something to help stop users mistakenly using force_parallel_mode?