From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | jian he <jian(dot)universality(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: information_schema.view attgenerated |
Date: | 2024-09-18 08:09:38 |
Message-ID: | 782d873b-5e18-4de4-8e5c-ab619f59d71a@eisentraut.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 16.09.24 06:12, jian he wrote:
> hi.
> one minor issue in src/backend/catalog/information_schema.sql
> /*
> * 6.22
> * COLUMNS view
> */
> CREATE VIEW columns ....
>
>
> CAST(CASE WHEN a.attgenerated = '' THEN pg_get_expr(ad.adbin,
> ad.adrelid) END AS character_data) AS column_default,
> can change to
> CAST(CASE WHEN a.attgenerated = '' AND a.atthasdef THEN
> pg_get_expr(ad.adbin, ad.adrelid) END AS character_data) AS
> column_default,
>
>
> CAST(CASE WHEN a.attgenerated <> '' THEN 'ALWAYS' ELSE 'NEVER' END AS
> character_data) AS is_generated,
> can change to
> CAST(CASE WHEN a.attgenerated <> '' AND a.atthasdef THEN 'ALWAYS' ELSE
> 'NEVER' END AS character_data) AS is_generated,
>
> CAST(CASE WHEN a.attgenerated <> '' THEN pg_get_expr(ad.adbin,
> ad.adrelid) END AS character_data) AS generation_expression,
> can change to
> CAST(CASE WHEN a.attgenerated <> '' AND a.atthasdef THEN
> pg_get_expr(ad.adbin, ad.adrelid) END AS character_data) AS
> generation_expression,
>
>
> i guess, it will have some minor speed up, also more accurate.
I'm having a hard time interpreting this report. Could you be more
clear about what is the existing code, and what is the code you are
proposing as new.?
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2024-09-18 08:23:22 | Re: [PATCH] WIP: replace method for jsonpath |
Previous Message | Peter Eisentraut | 2024-09-18 08:03:21 | Re: define pg_structiszero(addr, s, r) |