From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | michael(at)paquier(dot)xyz |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: ERROR: "ft1" is of the wrong type. |
Date: | 2021-02-19 08:30:39 |
Message-ID: | 20210219.173039.609314751334535042.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At Thu, 18 Feb 2021 17:17:37 +0900 (JST), Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> wrote in
> I can add some regression tests to cover all the live cases. That
> could reveal no-longer-used combinations.
The attached is that.
ATT_VIEW is used for "CREATE OR REPLACE view" and checked against
earlier in DefineVirtualRelation. But we can add a test to make sure
that is checked anywhere.
All other values can be exercised.
ATT_TABLE | ATT_MATVIEW
ATT_TABLE | ATT_MATVIEW | ATT_INDEX | ATT_PARTITIONED_INDEX
ATT_TABLE | ATT_MATVIEW | ATT_INDEX | ATT_PARTITIONED_INDEX |
ATT_FOREIGN_TABLE
ATT_TABLE | ATT_MATVIEW | ATT_FOREIGN_TABLE
ATT_TABLE | ATT_MATVIEW | ATT_INDEX | ATT_FOREIGN_TABLE
ATT_TABLE | ATT_PARTITIONED_INDEX
ATT_TABLE | ATT_VIEW | ATT_MATVIEW | ATT_INDEX
ATT_TABLE | ATT_VIEW | ATT_FOREIGN_TABLE:
ATT_FOREIGN_TABLE
These are provoked by the following commands respectively:
ALTER TABLE <view> CLUSTER ON
ALTER TABLE <view> SET TABLESPACE
ALTER TABLE <view> ALTER COLUMN <col> SET STATISTICS
ALTER TABLE <view> ALTER COLUMN <col> SET STORGE
ALTER TABLE <view> ALTER COLUMN <col> SET()
ALTER TABLE <view> ATTACH PARTITION
ALTER TABLE/INDEX <partidx> SET/RESET
ALTER TABLE <matview> ALTER <col> SET DEFAULT
ALTER TABLE/INDEX <pidx> ALTER COLLATION ..REFRESH VERSION
ALTER TABLE <view> OPTIONS ()
The following three errors are already excised.
ATT_TABLE
ATT_TABLE | ATT_FOREIGN_TABLE
ATT_TABLE | ATT_COMPOSITE_TYPE | ATT_FOREIGN_TABLE:
By the way, I find this as somewhat mystifying. I'm not sure it worth
fixing though..
ALTER MATERIALIZED VIEW mv1 ALTER COLUMN a SET DEFAULT 1;
ERROR: "mv1" is not a table, view, or foreign table
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
Attachment | Content-Type | Size |
---|---|---|
regression_tests_for_ATWrongRelkindError.patch | text/x-patch | 13.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Konstantin Knizhnik | 2021-02-19 08:51:35 | Re: [PoC] Non-volatile WAL buffer |
Previous Message | Pavel Stehule | 2021-02-19 08:12:59 | Re: Problem with accessing TOAST data in stored procedures |