Skip site navigation (1) Skip section navigation (2)

Re: pgAdmin III commit: Lots of work on domains, and check constraints

From: Timon <timosha(at)gmail(dot)com>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: pgAdmin III commit: Lots of work on domains, and check constraints
Date: 2012-08-17 05:39:54
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgadmin-hackers
and, one more little bug
altering index fillfactor produces wrong sql code
steps to reproduce:

1. create table
2. add index
3. chage fillfactor on created index
4. got error like "scheme name <table name> doesn't exists"
example of sql: ALTER INDEX gallery.idx_gallery_regionid_itemiddesc
gallery is the table name

2012/8/17 Timon <timosha(at)gmail(dot)com>:
> I tested this patch. It fixes my problem.
> Also it fixes one annoying crash when you click on indexes list.
> thanks for you work :)
> 2012/7/21 Guillaume Lelarge <guillaume(at)lelarge(dot)info>:
>> On Wed, 2012-06-06 at 10:50 +0600, Timon wrote:
>>> seems that this commit broke reindexing of selected index. steps to reproduce:
>>> 1) create table
>>> 2) create index
>>> 3) select index in object inspector
>>> 4) try to reindex it via maintenance menu item
>>> 5) got error : ERROR:  schema "table_name" does not exist
>>> and one more crash here
>>> .. same steps as before
>>> 4) try to CLUSTER index
>>> 5) pgadmin simply crashed
>> OK, I finally got some time to work on this. As Timon said, these bugs
>> come from the patch "Lots of work on domains, and check constraints". In
>> this patch, I changed some objects parent class from pgTableObject to
>> pgSchemaObject. Due to this change, the GetTable() method returns NULL,
>> which segfaults all statements that try to use the return value without
>> checking. The two examples above from Timon are exactly this.
>> I don't see many ways to get out of this issue.
>> We could use GetSchema() instead of GetTable(). It works, it's an easy
>> and small patch. But it'll certainly be a maintenance nightmare (at
>> least without any comments)
>> We could also revert my patch. It's simple, we loose the feature of
>> adding as many check constraints as we want to a domain, we loose the
>> feature of renaming and validating constraints, and we gain a few bugs.
>> I don't see any other options. My own personal choice would be the first
>> one (see attached patch). But it's a tough call.
>> Comments?
>> --
>> Guillaume
> --
> All bugs reserved

All bugs reserved

In response to


pgadmin-hackers by date

Next:From: Magnus HaganderDate: 2012-08-20 07:21:30
Subject: Re: Thousands separator
Previous:From: TimonDate: 2012-08-17 04:01:30
Subject: Re: pgAdmin III commit: Lots of work on domains, and check constraints

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group