Re: Index of expression over table row or column

Поиск
Список
Период
Сортировка
От Steve Lau
Тема Re: Index of expression over table row or column
Дата
Msg-id 3D517897-C6B8-4BAC-A3ED-100B17D6577E@outlook.com
обсуждение исходный текст
Ответ на Re: Index of expression over table row or column  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список 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 по дате отправления: