DROP TABLE test; CREATE TABLE test (id INT); GRANT ALL ON test TO nobody; INSERT INTO test VALUES(1); SELECT * FROM test; |
$ psql test -f test1.sql DROP CREATE CHANGE psql:test1.sql:8: ERROR: test: Permission denied. psql:test1.sql:9: ERROR: test: Permission denied. |
DROP TABLE test; CREATE TABLE test (id INT); GRANT ALL ON test TO foo; <--- 追加 GRANT ALL ON test TO nobody; INSERT INTO test VALUES(1); SELECT * FROM test; |
$ psql test test=# \d List of relations Name | Type | Owner -------------+-------+---------- ServerList | table | postgres (1 rows) test=# select * from ServerList; ERROR: Relation 'serverlist' does not exist |
$ psql test test-# \d List of relations Name | Type | Owner -------------+-------+---------- vpeB | table | postgres <---- ほんとは「プロパティ」というテーブル名 (1 rows) |
test-# select * from vpeB; ERROR: parser: parse error at or near "q" test=# select * from プロパティ; ERROR: Relation 'プロパティ' does not exist test=# select * from "プロパティ"; ERROR: Relation 'プロパティ' does not exist |
$ pg_dump test > test.dump $ nkf -e test.dump > test.dump.euc $ dropdb test $ createdb test $ psql test < test.dump.euc |