From: | Marcos Pegoraro <marcos(at)f10(dot)com(dot)br> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Useless toast |
Date: | 2024-07-23 18:35:13 |
Message-ID: | CAB-JLwYOe2h4TdwCGs8Es127zBgvh+8hrja-zUU21hDhOz9ybA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Using version 16, seems strange when toast needs to be created. Tested with
domain being numeric or varchar(10) with the same results.
And If that domain is integer then no toast is created.
I think none of these tables should have a toast, right ?
postgres=# create domain mynum as numeric(15,2);
CREATE DOMAIN
postgres=# create table tab1(id integer, num numeric(15,2));
CREATE TABLE
postgres=# create table tab2(id integer, num mynum);
CREATE TABLE
postgres=# create table tab3(id integer, num mynum storage main);
CREATE TABLE
postgres=# create table tab4(id integer, num mynum storage plain);
CREATE TABLE
postgres=# select relname, reltoastrelid from pg_class where relname ~
'tab\d$' order by 1;
relname | reltoastrelid
---------+---------------
tab1 | 0
tab2 | 25511
tab3 | 25516
tab4 | 0
(4 rows)
regards
Marcos
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2024-07-23 18:40:27 | Re: [18] Policy on IMMUTABLE functions and Unicode updates |
Previous Message | Fujii Masao | 2024-07-23 18:27:15 | Re: Add privileges test for pg_stat_statements to improve coverage |