Re: Index of expression over table row or column - Mailing list pgsql-docs

From Steve Lau
Subject Re: Index of expression over table row or column
Date
Msg-id 3D517897-C6B8-4BAC-A3ED-100B17D6577E@outlook.com
Whole thread Raw
In response to Re: Index of expression over table row or column  (Laurenz Albe <laurenz.albe@cybertec.at>)
List pgsql-docs
Hi

> On Oct 16, 2024, at 12:17 PM, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
> 
> And what would you say about this (silly) example:
> 
>  CREATE TABLE x (a integer, b integer);
>  CREATE INDEX ON x(hash_record(x));

When I talk about an expression over something, I mainly think about it at the AST level, I guess the AST of expression
“hash_record(x)”will be something like (I tried to parse this statement and print the AST using pg_query.rs, but looks
likethis library does not have an AST type defined, sorry if my guess is too incorrect):
 

FunctionCall {
    name: “hash_record",
    arguments: [
        Table {
            name: "x"
        }
    ]
}

So it is not table columns or rows IMHO.

Regards, Steve.


pgsql-docs by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Index of expression over table row or column
Next
From: Peter Eisentraut
Date:
Subject: Re: Limitation relates to memory allocation