public inbox for [email protected]help / color / mirror / Atom feed
PATCH: To fix the issue in exclusion constraint (pgAdmin4) 4+ messages / 2 participants [nested] [flat]
* PATCH: To fix the issue in exclusion constraint (pgAdmin4) @ 2016-12-30 09:47 Murtuza Zabuawala <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Murtuza Zabuawala @ 2016-12-30 09:47 UTC (permalink / raw) To: pgadmin-hackers Hi, PFA patch to fix the issue where we were fetching wrong OID while generating node which was causing "index out of range". error when user try to access that exclusion constraint . RM#1896 -- Regards, Murtuza Zabuawala EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgadmin-hackers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers Attachments: [application/octet-stream] RM_1896.patch (5.1K, 3-RM_1896.patch) download | inline diff: diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/__init__.py index dbda807..9b030d4 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/__init__.py +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/__init__.py @@ -622,7 +622,7 @@ class ExclusionConstraintView(PGChildNodeView): return make_json_response( status=400, success=0, - errormsg=e + errormsg=str(e) ) @check_precondition diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_oid.sql index 168e13b..6b50c3b 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_oid.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_oid.sql @@ -1,4 +1,4 @@ -SELECT ct.oid +SELECT ct.conindid as oid FROM pg_constraint ct WHERE contype='x' AND ct.conname = {{ name|qtLiteral }}; \ No newline at end of file diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_oid_with_transaction.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_oid_with_transaction.sql index 0fc1fa8..71111a5 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_oid_with_transaction.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_oid_with_transaction.sql @@ -1,4 +1,4 @@ -SELECT ct.oid, +SELECT ct.conindid as oid, ct.conname as name, NOT convalidated as convalidated FROM pg_constraint ct diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.2_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.2_plus/get_oid.sql index 168e13b..3821778 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.2_plus/get_oid.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.2_plus/get_oid.sql @@ -1,4 +1,4 @@ -SELECT ct.oid +SELECT ct.conindid as oid FROM pg_constraint ct WHERE contype='x' AND ct.conname = {{ name|qtLiteral }}; \ No newline at end of file diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.2_plus/get_oid_with_transaction.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.2_plus/get_oid_with_transaction.sql index 0fc1fa8..dcad295 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.2_plus/get_oid_with_transaction.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.2_plus/get_oid_with_transaction.sql @@ -1,4 +1,4 @@ -SELECT ct.oid, +SELECT ct.conindid as oid, ct.conname as name, NOT convalidated as convalidated FROM pg_constraint ct diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.6_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.6_plus/get_oid.sql index 168e13b..3821778 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.6_plus/get_oid.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.6_plus/get_oid.sql @@ -1,4 +1,4 @@ -SELECT ct.oid +SELECT ct.conindid as oid FROM pg_constraint ct WHERE contype='x' AND ct.conname = {{ name|qtLiteral }}; \ No newline at end of file diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.6_plus/get_oid_with_transaction.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.6_plus/get_oid_with_transaction.sql index 0fc1fa8..dcad295 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.6_plus/get_oid_with_transaction.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.6_plus/get_oid_with_transaction.sql @@ -1,4 +1,4 @@ -SELECT ct.oid, +SELECT ct.conindid as oid, ct.conname as name, NOT convalidated as convalidated FROM pg_constraint ct ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: PATCH: To fix the issue in exclusion constraint (pgAdmin4) @ 2017-01-08 13:43 Dave Page <[email protected]> parent: Murtuza Zabuawala <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Dave Page @ 2017-01-08 13:43 UTC (permalink / raw) To: Murtuza Zabuawala <[email protected]>; +Cc: pgadmin-hackers Hi On Friday, December 30, 2016, Murtuza Zabuawala < [email protected]> wrote: > Hi, > > PFA patch to fix the issue where we were fetching wrong OID while > generating node which was causing "index out of range". error when user > try to access that exclusion constraint . > RM#1896 > I can't reproduce this, even following the steps in the ticket. How did you manage to reproduce it? -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: PATCH: To fix the issue in exclusion constraint (pgAdmin4) @ 2017-01-09 09:12 Dave Page <[email protected]> parent: Dave Page <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Dave Page @ 2017-01-09 09:12 UTC (permalink / raw) To: Murtuza Zabuawala <[email protected]>; +Cc: pgadmin-hackers Hi On Mon, Jan 9, 2017 at 10:46 AM, Murtuza Zabuawala <[email protected]> wrote: > Hi Dave, > > I followed, > > 1) First click on main properties panel. > > 2) Sample definition, > > CREATE TABLE public.test_table > ( > id character varying(3) COLLATE pg_catalog."default" NOT NULL, > col1 bigint, > CONSTRAINT test_pkey PRIMARY KEY (id) > ) > WITH ( > OIDS = FALSE > ) > TABLESPACE pg_default; > > With above created table, create exclusion constraint with following options > using GUI, > > ALTER TABLE public.test_table > ADD CONSTRAINT test_exclu EXCLUDE USING btree ( > col1 DESC NULLS LAST WITH =); > > Click on Save, Exclusion constraint will be created successfully but you > will get error as wrong OID was sent while generating node info. Nope - it works fine for me. I wonder what's different... -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgadmin-hackers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: PATCH: To fix the issue in exclusion constraint (pgAdmin4) @ 2017-01-09 09:35 Dave Page <[email protected]> parent: Dave Page <[email protected]> 0 siblings, 0 replies; 4+ messages in thread From: Dave Page @ 2017-01-09 09:35 UTC (permalink / raw) To: Murtuza Zabuawala <[email protected]>; +Cc: pgadmin-hackers Patch applied (once Murtuza showed me how to recreate the problem). Thanks! On Mon, Jan 9, 2017 at 2:42 PM, Dave Page <[email protected]> wrote: > Hi > > On Mon, Jan 9, 2017 at 10:46 AM, Murtuza Zabuawala > <[email protected]> wrote: >> Hi Dave, >> >> I followed, >> >> 1) First click on main properties panel. >> >> 2) Sample definition, >> >> CREATE TABLE public.test_table >> ( >> id character varying(3) COLLATE pg_catalog."default" NOT NULL, >> col1 bigint, >> CONSTRAINT test_pkey PRIMARY KEY (id) >> ) >> WITH ( >> OIDS = FALSE >> ) >> TABLESPACE pg_default; >> >> With above created table, create exclusion constraint with following options >> using GUI, >> >> ALTER TABLE public.test_table >> ADD CONSTRAINT test_exclu EXCLUDE USING btree ( >> col1 DESC NULLS LAST WITH =); >> >> Click on Save, Exclusion constraint will be created successfully but you >> will get error as wrong OID was sent while generating node info. > > Nope - it works fine for me. I wonder what's different... > > > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgadmin-hackers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2017-01-09 09:35 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2016-12-30 09:47 PATCH: To fix the issue in exclusion constraint (pgAdmin4) Murtuza Zabuawala <[email protected]> 2017-01-08 13:43 ` Dave Page <[email protected]> 2017-01-09 09:12 ` Dave Page <[email protected]> 2017-01-09 09:35 ` Dave Page <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox