[Gambas-user] Database manager Save Table problem

Richard Frost dickfrost at ...2291...
Thu Sep 10 20:50:20 CEST 2009


Benoît Minisini wrote:
>> I m a new Gambas2 user, and I am not sure where "little things" like
>> this should be posted, so if it should be somewhere else, please let me
>> know.
>>
>> My system is Ubuntu Jaunty 9.04, Gambas2-2.15.2, Postgresql
>>
>> In the Database Manager, when I save changes to a table which has an
>> index defined, I get an error message that the index already exists.
>>
>> Looking at the code, in FTable.class, function WriteTable,  there are
>> two WriteTableDef  calls, the first which creates a temporary table
>> (which it deletes afterward), and then a call to write the actual table.
>>
>> Postgres evidently requires index names to be unique within the
>> database, so the create of the temporary table fails as it tries to
>> create another index with the same name, and which of course then it
>> does not process the write of the actual table.
>>     
>
> Apparently on other database systems, two index can have the same name 
> provided they are on different tables.
>
> I will modify the postgresql driver to add the table name before each index, 
> it should solve the problem.
>
> And, as usual, someone finds a bug just after a new version is released. :-)
>
> Regards,
>
>   
Thanks Benoît,

Sorry about the timing of finding this (relative to the new release), I 
am a very new Gambas user.

So far it is very impressive ... thanks for your's and everyone's hard work.

I also made another post which disappeared, so I'll mention it here in 
case it helps someone else. When I first installed, and  tried to edit 
tables with the database manager, it appeared to do nothing. Eventually 
I discovered that the workspace area of the window where the table edit 
forms are was sized so narrow that it didn't show up (I had a hard time 
even noticing that it was there until I looked at the form design). By 
dragging it back towards the tree view part of the window, everything 
was just fine.

Thanks again, Dick




More information about the User mailing list