-
Notifications
You must be signed in to change notification settings - Fork 641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error out / warn on ALTER TABLE SET SCHEMA and ALTER TABLE ALL IN TABLESPACE #132
Milestone
Comments
This was referenced Feb 10, 2016
The steps to produce an error: CREATE SCHEMA tpch;
CREATE TABLE nation_hash (
n_nationkey integer not null,
n_name char(25) not null,
n_regionkey integer not null,
n_comment varchar(152));
SELECT master_create_distributed_table('nation_hash', 'n_nationkey', 'hash');
SELECT master_create_worker_shards('nation_hash', 4, 1);
\COPY nation_hash FROM STDIN WITH CSV
1,'name',1,'comment_1'
2,'name',2,'comment_2'
3,'name',3,'comment_3'
4,'name',4,'comment_4'
5,'name',5,'comment_5'
SELECT * FROM nation_hash;
n_nationkey | n_name | n_regionkey | n_comment
-------------+---------------------------+-------------+-------------
1 | 'name' | 1 | 'comment_1'
5 | 'name' | 5 | 'comment_5'
3 | 'name' | 3 | 'comment_3'
4 | 'name' | 4 | 'comment_4'
2 | 'name' | 2 | 'comment_2'
(5 rows)
ALTER TABLE nation_hash SET SCHEMA tpch;
SELECT * FROM tpch.nation_hash;
WARNING: Bad result from localhost:9700
DETAIL: Remote message: relation "tpch.nation_hash_102008" does not exist
|
For ALTER TABLE SET SCHEMA, I think there is not much work between warning out or actually propagating it to workers. With #662 we support ALTER TABLE SET SCHEMA and warn out for ALTER TABLE ALL IN TABLESPACE. |
byucesoy
pushed a commit
that referenced
this issue
Jul 22, 2016
Fixes #132 We hook into ALTER ... SET SCHEMA and warn out if user tries to change schema of a distributed table. We also hook into ALTER TABLE ALL IN TABLE SPACE statements and warn out if citus has been loaded.
DimCitus
pushed a commit
that referenced
this issue
Jan 10, 2018
Fixes #132 We hook into ALTER ... SET SCHEMA and warn out if user tries to change schema of a distributed table. We also hook into ALTER TABLE ALL IN TABLE SPACE statements and warn out if citus has been loaded.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, we only hook into AlterTableStmt and RenameStmt. We should also hook into these commands and error out (or warn).
The text was updated successfully, but these errors were encountered: