Inadequate infrastructure for NextValueExpr

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Inadequate infrastructure for NextValueExpr
Date: 2017-07-13 21:34:21
Message-ID: 23862.1499981661@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Somebody decided they could add a new primnode type without bothering to
build out very much infrastructure for it. Thus:

regression=# create table foo (f1 int, f2 int generated always as identity);
CREATE TABLE
regression=# insert into foo values(1);
INSERT 0 1
regression=# explain verbose insert into foo values(1);
ERROR: unrecognized node type: 146

because ruleutils.c has never heard of NextValueExpr. The lack of
outfuncs/readfuncs support for it is rather distressing as well.
That doesn't break parallel queries today, because (I think)
you can't get one of these nodes in a parallelizable query, but it
is going to cause problems for debugging. It will also break
(more or less) pg_stat_statements. I also wonder whether costsize.c
oughtn't be charging some estimated execution cost for it.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2017-07-13 22:33:25 Re: SCRAM auth and Pgpool-II
Previous Message Tom Lane 2017-07-13 20:41:41 Re: CAST vs ::