On 05.11.25 19:19, Masahiko Sawada wrote:
Attached is my proposed patch. I kept it similar to the recently
committed fix in commit ba99c9491c4. Note that we also need to consider
whole-row references, as that patch did.
Here are some minor comments for the proposed patch:
+
On Wed, Nov 5, 2025 at 3:43 AM Peter Eisentraut wrote:
>
> On 04.11.25 12:43, jian he wrote:
> >>> generated column allow tableoid system column reference, COPY WHERE
> >>> clause also
> >>> allow tableoid column reference, should be fine.
> >>>
> >
> > for virtual generated column, adding
> > ``
On 04.11.25 12:43, jian he wrote:
generated column allow tableoid system column reference, COPY WHERE clause also
allow tableoid column reference, should be fine.
for virtual generated column, adding
``whereClause = expand_generated_columns_in_expr(whereClause, rel, 1);``
should be able to so
On Tue, Nov 4, 2025 at 8:27 AM Masahiko Sawada wrote:
>
> The proposed patch (the 0002 patch) allows COPY FROM ... WHERE to
> filter rows by checking tuples including generated column values but
> it's somewhat odd as it seems not to be the time of reading tuples
> from a table.
>
> Also, the patc
On Mon, Oct 27, 2025 at 1:21 AM jian he wrote:
>
> hi.
>
> CREATE TABLE gtest0 (a int, b int GENERATED ALWAYS AS (a + 1) VIRTUAL);
> copy gtest0 from stdin where (b <> 1);
> 0
> \.
>
> ERROR: unexpected virtual generated column reference
> CONTEXT: COPY gtest0, line 1: "0"
>
> We need to apply e
On Tue, Oct 28, 2025 at 2:02 AM Kirill Reshke wrote:
>
> Small comment: in 0002:
>
> > + if (has_stored_generated)
> > + ExecComputeStoredGenerated(resultRelInfo, estate, myslot,
> > + CMD_INSERT);
>
> Should we use CMD_UTILITY here? Comment in nodes.h suggests so. Also,
> ExecComputeStoredGener
On Mon, 27 Oct 2025 at 13:21, jian he wrote:
>
> hi.
>
> CREATE TABLE gtest0 (a int, b int GENERATED ALWAYS AS (a + 1) VIRTUAL);
> copy gtest0 from stdin where (b <> 1);
> 0
> \.
>
> ERROR: unexpected virtual generated column reference
> CONTEXT: COPY gtest0, line 1: "0"
>
> We need to apply exp
hi.
CREATE TABLE gtest0 (a int, b int GENERATED ALWAYS AS (a + 1) VIRTUAL);
copy gtest0 from stdin where (b <> 1);
0
\.
ERROR: unexpected virtual generated column reference
CONTEXT: COPY gtest0, line 1: "0"
We need to apply expand_generated_columns_in_expr to the whereClause in DoCopy.
However