Re: [Proposal] Global temporary tables
От | Prabhat Sahu |
---|---|
Тема | Re: [Proposal] Global temporary tables |
Дата | |
Msg-id | CANEvxPobJ7Yy-B2_UmRwxUydygY=GyEp4JsyjYfHtNB+qCAz4w@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [Proposal] Global temporary tables (Pavel Stehule <pavel.stehule@gmail.com>) |
Ответы |
Re: [Proposal] Global temporary tables
|
Список | pgsql-hackers |
Hi Wenjing,
Please check the allowed values for boolean parameter "on_commit_delete_rows".
postgres=# create global temp table gtt1(c1 int) with(on_commit_delete_rows='true');
CREATE TABLE
Similarly we can successfully create GTT by using the values as: 'true','false', true, false, 'ON', 'OFF', ON, OFF, 1, 0 for boolean parameter "on_commit_delete_rows"
But we are getting error while using the boolean value as: '1', '0', 't', 'f', 'yes', 'no', 'y', 'n' as below.
postgres=# create global temp table gtt11(c1 int) with(on_commit_delete_rows='1');
ERROR: on_commit_delete_rows requires a Boolean value
postgres=# create global temp table gtt11(c1 int) with(on_commit_delete_rows='0');
ERROR: on_commit_delete_rows requires a Boolean value
postgres=# create global temp table gtt11(c1 int) with(on_commit_delete_rows='t');
ERROR: on_commit_delete_rows requires a Boolean value
postgres=# create global temp table gtt11(c1 int) with(on_commit_delete_rows='f');
ERROR: on_commit_delete_rows requires a Boolean value
postgres=# create global temp table gtt11(c1 int) with(on_commit_delete_rows='yes');
ERROR: on_commit_delete_rows requires a Boolean value
postgres=# create global temp table gtt11(c1 int) with(on_commit_delete_rows='no');
ERROR: on_commit_delete_rows requires a Boolean value
postgres=# create global temp table gtt11(c1 int) with(on_commit_delete_rows='y');
ERROR: on_commit_delete_rows requires a Boolean value
postgres=# create global temp table gtt11(c1 int) with(on_commit_delete_rows='n');
ERROR: on_commit_delete_rows requires a Boolean value
-- As per the error message "ERROR: on_commit_delete_rows requires a Boolean value" either we should allow all the boolean values.
postgres=# create global temp table gtt1(c1 int) with(on_commit_delete_rows='true');
CREATE TABLE
Similarly we can successfully create GTT by using the values as: 'true','false', true, false, 'ON', 'OFF', ON, OFF, 1, 0 for boolean parameter "on_commit_delete_rows"
But we are getting error while using the boolean value as: '1', '0', 't', 'f', 'yes', 'no', 'y', 'n' as below.
postgres=# create global temp table gtt11(c1 int) with(on_commit_delete_rows='1');
ERROR: on_commit_delete_rows requires a Boolean value
postgres=# create global temp table gtt11(c1 int) with(on_commit_delete_rows='0');
ERROR: on_commit_delete_rows requires a Boolean value
postgres=# create global temp table gtt11(c1 int) with(on_commit_delete_rows='t');
ERROR: on_commit_delete_rows requires a Boolean value
postgres=# create global temp table gtt11(c1 int) with(on_commit_delete_rows='f');
ERROR: on_commit_delete_rows requires a Boolean value
postgres=# create global temp table gtt11(c1 int) with(on_commit_delete_rows='yes');
ERROR: on_commit_delete_rows requires a Boolean value
postgres=# create global temp table gtt11(c1 int) with(on_commit_delete_rows='no');
ERROR: on_commit_delete_rows requires a Boolean value
postgres=# create global temp table gtt11(c1 int) with(on_commit_delete_rows='y');
ERROR: on_commit_delete_rows requires a Boolean value
postgres=# create global temp table gtt11(c1 int) with(on_commit_delete_rows='n');
ERROR: on_commit_delete_rows requires a Boolean value
-- As per the error message "ERROR: on_commit_delete_rows requires a Boolean value" either we should allow all the boolean values.
Example: CREATE VIEW view1 WITH (security_barrier = 'true') as select 5;The syntax of VIEW allows all the above possible boolean values for the boolean parameter "security_barrier"
-- or else we should change the error message something like
"ERROR: on_commit_delete_rows requires 'true','false','ON','OFF',1,0 as Boolean value".
"ERROR: on_commit_delete_rows requires 'true','false','ON','OFF',1,0 as Boolean value".
With Regards,
Prabhat Kumar Sahu
EnterpriseDB: http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: