You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Years ago, when I used PGSQL to create a table, I found that the table could not be displayed. When the problem recurred today, it was said that the problem was located in the partition table.
Problem Description
The partition table I created is not displayed, but the partitions can be displayed. For example, if I create a partition table called tb_test, this table will not be displayed (refreshing is useless), and then I create a partition for this table such as tb_test_0/ 1/2/3, these partitions can be displayed normally.
Problem recurrence
The following is the SQL code (PgSQL) that I executed when reproducing:
DROPTABLE IF EXISTS public.tb_test;
CREATETABLEpublic.tb_test (
id bigserialNOT NULL,
tx_date varchar(8) NOT NULL,
CONSTRAINT PK_tb_test_ID PRIMARY KEY (id, tx_date) -- Added a primary key constraint using ID and tx_date
)
PARTITION BY LIST (tx_date); --Partition LIST, RANGE, LIST is used here
You can also check the contents of the table by executing SELECT
SELECT*FROMpublic.tb_test;
At the same time, if you try to create a new table without deleting it, an error will be reported. You can be sure that the table does exist.
At this time, refresh the Schema named plat in Chat2DB and view it as empty. The screenshot is as follows:
But you can see this table in DBeaver, the screenshot is as follows:
If I create a partition named tb_test_0/1/2/3 for the table at this time, it will be displayed normally, but it will not be displayed in DBeaver. The relevant statements and screenshots are as follows:
CREATETABLEplat.tb_test_0 PARTITION OF plat.tb_test FOR VALUESIN ('20240110');
(Since it is just a test, only three partitions are created here, where the constant in plat.tb_test_%d is equal to the last digit of the date).
Summarize
The above is the specific description of this BUG. In fact, I am not sure whether this is a BUG or whether Chat2DB is deliberately set up like this. However, in my work scenario, the relevant partitions of this table are automatically created every day, that is It said that after I created all the work tables, the partition table was not displayed, which was a bit inconvenient and strange to use.
Thank you again to all developers for your hard work and reading! Happy New Year to everyone! Good luck in the Year of the Dragon!
The text was updated successfully, but these errors were encountered:
Chat2DB Version
3.1.15
Describe the bug
Preface
Years ago, when I used PGSQL to create a table, I found that the table could not be displayed. When the problem recurred today, it was said that the problem was located in the partition table.
Problem Description
The partition table I created is not displayed, but the partitions can be displayed. For example, if I create a partition table called
tb_test
, this table will not be displayed (refreshing is useless), and then I create a partition for this table such astb_test_0/ 1/2/3
, these partitions can be displayed normally.Problem recurrence
SELECT
At the same time, if you try to create a new table without deleting it, an error will be reported. You can be sure that the table does exist.
But you can see this table in DBeaver, the screenshot is as follows:
tb_test_0/1/2/3
for the table at this time, it will be displayed normally, but it will not be displayed in DBeaver. The relevant statements and screenshots are as follows:(Since it is just a test, only three partitions are created here, where the constant in
plat.tb_test_%d
is equal to the last digit of the date).Summarize
The above is the specific description of this BUG. In fact, I am not sure whether this is a BUG or whether Chat2DB is deliberately set up like this. However, in my work scenario, the relevant partitions of this table are automatically created every day, that is It said that after I created all the work tables, the partition table was not displayed, which was a bit inconvenient and strange to use.
Thank you again to all developers for your hard work and reading! Happy New Year to everyone! Good luck in the Year of the Dragon!
The text was updated successfully, but these errors were encountered: