Обсуждение: [pgAdmin III] #167: Missing RULEs for VIEWs in SQL pane
#167: Missing RULEs for VIEWs in SQL pane
----------------------+-----------------------------------------------------
Reporter: brsa | Owner: dpage
Type: bug | Status: new
Priority: minor | Milestone:
Component: pgadmin | Version: trunk
Keywords: SQL pane | Platform: all
----------------------+-----------------------------------------------------
SQL pane:
RULEs are added to the SQL of TABLEs, but they are missing with VIEWs.
That is inconsistent at the least. If the general guideline is: the
displayed SQL shall be able to recreate an identical object (or so is my
understanding, at least with identical settings), it's a bug.
Demo:
-- TABLE --
-- i say --
CREATE TABLE test (id integer);
CREATE TABLE test2 (id integer);
CREATE RULE on_delete AS
ON DELETE
TO test
DO INSTEAD
DELETE FROM test2
WHERE test2.id = old.id;
-- pgadmin says --
-- Table: test
-- DROP TABLE test;
CREATE TABLE test
(
id integer
)
WITH (
OIDS=FALSE
);
ALTER TABLE test OWNER TO postgres;
-- Rule: "on_delete ON test"
-- DROP RULE on_delete ON test;
CREATE OR REPLACE RULE on_delete AS
ON DELETE TO test DO INSTEAD DELETE FROM test2
WHERE test2.id = old.id;
-- note the attached RULE
[[br]]
-- VIEW --
-- I say --
CREATE VIEW v_test AS
SELECT * FROM test;
CREATE RULE on_delete AS
ON DELETE
TO v_test
DO INSTEAD
DELETE FROM test2
WHERE test2.id = old.id;
-- pgadmin says --
CREATE OR REPLACE VIEW v_test AS
SELECT test.id
FROM test;
(...)
-- note the missing RULE!
--
Ticket URL: <http://code.pgadmin.org/trac/ticket/167>
pgAdmin III <http://code.pgadmin.org/trac/>
pgAdmin III
#167: Missing RULEs for VIEWs in SQL pane
-----------------------------+----------------------------------------------
Reporter: brsa | Owner: gleu
Type: bug | Status: assigned
Priority: minor | Milestone:
Component: pgadmin | Version: 1.10
Keywords: browser sqlpane | Platform: all
-----------------------------+----------------------------------------------
Changes (by gleu):
* keywords: SQL pane => browser sqlpane
* owner: dpage => gleu
* version: trunk => 1.10
* status: new => assigned
--
Ticket URL: <http://code.pgadmin.org/trac/ticket/167#comment:1>
pgAdmin III <http://code.pgadmin.org/trac/>
pgAdmin III
#167: Missing RULEs for VIEWs in SQL pane
----------------------+-----------------------------------------------------
Reporter: brsa | Owner: gleu
Type: bug | Status: closed
Priority: minor | Milestone: 1.10.3
Component: pgadmin | Version: 1.10
Resolution: fixed | Keywords: browser sqlpane
Platform: all |
----------------------+-----------------------------------------------------
Changes (by gleu):
* status: assigned => closed
* resolution: => fixed
* milestone: => 1.10.3
Comment:
Fixed in r8264 and r8265.
--
Ticket URL: <http://code.pgadmin.org/trac/ticket/167#comment:2>
pgAdmin III <http://code.pgadmin.org/trac/>
pgAdmin III