Chauhan Dhruv <[email protected]> writes:
> If you CREATE INDEX on an expression without naming the index, Postgres
> generates a name for the index column from that expression.  For some
> expressions the generated name comes out empty, so the index column is
> left with an empty attname.

> Example (a whole-row reference):

>     CREATE TABLE t (a int, b int);
>     CREATE INDEX ON t ((t IS NOT NULL));

Hmm, yeah, that's not great, although I'd argue that the real issue in
this particular example is that we should treat the whole-row Var as
being named "t" rather than being ignored.  Still, installing a
fallback of "expr" isn't a bad idea.

                        regards, tom lane


Reply via email to