Useless toast - Mailing list pgsql-hackers

From Marcos Pegoraro
Subject Useless toast
Date
Msg-id CAB-JLwYOe2h4TdwCGs8Es127zBgvh+8hrja-zUU21hDhOz9ybA@mail.gmail.com
Whole thread Raw
Responses Re: Useless toast
Re: Useless toast
List 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

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Add privileges test for pg_stat_statements to improve coverage
Next
From: Robert Haas
Date:
Subject: Re: [18] Policy on IMMUTABLE functions and Unicode updates