Thread: Quoted rule identifiers (schema name)
Hello, This is the copy of the script produced in the SQL editor window upon clicking on "CREATE script" for my rule with quotedidentifiers: -- Rule: ""EMPLOYMENT_CONTRACT_ACCOUNTINGS_EDITOR_INSERT_RULE" ON ACCOUNTING."EMPLOYMENT_CONTRACT_ACCOUNTINGS_EDITOR"" -- DROP RULE "EMPLOYMENT_CONTRACT_ACCOUNTINGS_EDITOR_INSERT_RULE" ON ACCOUNTING."EMPLOYMENT_CONTRACT_ACCOUNTINGS_EDITOR"; CREATE OR REPLACE RULE "EMPLOYMENT_CONTRACT_ACCOUNTINGS_EDITOR_INSERT_RULE" AS ON INSERT TO "ACCOUNTING"."EMPLOYMENT_CONTRACT_ACCOUNTINGS_EDITOR"DO INSTEAD INSERT INTO ... What I miss: - the quotation mark around the schema qualifier in the "Rule: ..." and "DROP ..." lines - the schema qualifier in the "CREATE OR REPLACE ..." line The same for the view itself looks fine: -- View: "ACCOUNTING"."EMPLOYMENT_CONTRACT_ACCOUNTINGS_EDITOR" -- DROP VIEW "ACCOUNTING"."EMPLOYMENT_CONTRACT_ACCOUNTINGS_EDITOR"; CREATE OR REPLACE VIEW "ACCOUNTING"."EMPLOYMENT_CONTRACT_ACCOUNTINGS_EDITOR" AS ... Regards, B. _________________________________________________________________ Hotmail: Free, trusted and rich email service. https://signup.live.com/signup.aspx?id=60969
Hi, Le 19/04/2010 17:31, sbremal@hotmail.com a écrit : > [...] > This is the copy of the script produced in the SQL editor window upon clicking on "CREATE script" for my rule with quotedidentifiers: > > -- Rule: ""EMPLOYMENT_CONTRACT_ACCOUNTINGS_EDITOR_INSERT_RULE" ON ACCOUNTING."EMPLOYMENT_CONTRACT_ACCOUNTINGS_EDITOR"" > -- DROP RULE "EMPLOYMENT_CONTRACT_ACCOUNTINGS_EDITOR_INSERT_RULE" ON ACCOUNTING."EMPLOYMENT_CONTRACT_ACCOUNTINGS_EDITOR"; > CREATE OR REPLACE RULE "EMPLOYMENT_CONTRACT_ACCOUNTINGS_EDITOR_INSERT_RULE" AS > ON INSERT TO "ACCOUNTING"."EMPLOYMENT_CONTRACT_ACCOUNTINGS_EDITOR" DO INSTEAD INSERT INTO ... > > What I miss: > > - the quotation mark around the schema qualifier in the "Rule: ..." and "DROP ..." lines OK, this will be simple to do. I'll add a ticket and work on this tomorrow. > - the schema qualifier in the "CREATE OR REPLACE ..." line > The CREATE OR REPLACE line seems good to me. Can you tell me what you already have and what you want? Thanks. > The same for the view itself looks fine: > > -- View: "ACCOUNTING"."EMPLOYMENT_CONTRACT_ACCOUNTINGS_EDITOR" > -- DROP VIEW "ACCOUNTING"."EMPLOYMENT_CONTRACT_ACCOUNTINGS_EDITOR"; > CREATE OR REPLACE VIEW "ACCOUNTING"."EMPLOYMENT_CONTRACT_ACCOUNTINGS_EDITOR" AS ... > -- Guillaume.http://www.postgresqlfr.orghttp://dalibo.com
Le 20/04/2010 00:03, Guillaume Lelarge a écrit : > Hi, > > Le 19/04/2010 17:31, sbremal@hotmail.com a écrit : >> [...] >> This is the copy of the script produced in the SQL editor window upon clicking on "CREATE script" for my rule with quotedidentifiers: >> >> -- Rule: ""EMPLOYMENT_CONTRACT_ACCOUNTINGS_EDITOR_INSERT_RULE" ON ACCOUNTING."EMPLOYMENT_CONTRACT_ACCOUNTINGS_EDITOR"" >> -- DROP RULE "EMPLOYMENT_CONTRACT_ACCOUNTINGS_EDITOR_INSERT_RULE" ON ACCOUNTING."EMPLOYMENT_CONTRACT_ACCOUNTINGS_EDITOR"; >> CREATE OR REPLACE RULE "EMPLOYMENT_CONTRACT_ACCOUNTINGS_EDITOR_INSERT_RULE" AS >> ON INSERT TO "ACCOUNTING"."EMPLOYMENT_CONTRACT_ACCOUNTINGS_EDITOR" DO INSTEAD INSERT INTO ... >> >> What I miss: >> >> - the quotation mark around the schema qualifier in the "Rule: ..." and "DROP ..." lines > > OK, this will be simple to do. I'll add a ticket and work on this tomorrow. > Done (http://code.pgadmin.org/trac/ticket/170), and fix commited. -- Guillaume.http://www.postgresqlfr.orghttp://dalibo.com