Re: Ticket 266: Unable to backup table when quotation marks used in the name

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Ticket 266: Unable to backup table when quotation marks used in the name
Date: 2010-11-23 11:13:49
Message-ID: 4CEBA1ED.3000004@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Le 20/11/2010 12:13, Guillaume Lelarge a écrit :
> Le 19/11/2010 14:47, Dave Page a écrit :
>> On Thu, Nov 18, 2010 at 11:36 PM, Guillaume Lelarge
>> <guillaume(at)lelarge(dot)info> wrote:
>>> Le 18/11/2010 09:08, Guillaume Lelarge a écrit :
>>>> Le 18/11/2010 05:25, Ashesh Vashi a écrit :
>>>>> Hi Guillaume,
>>>>>
>>>>> As long as I do remember, the commandLineClenOption() function was
>>>>> introduced, because of the command-line parameter behaves differently with
>>>>> quote on different platforms.
>>>>>
>>>>
>>>> I figured that but there's no OS specific code.
>>>>
>>>>> Though - I have tested your patch (Sorry - I do not have enough time to
>>>>> spend around pgAdmin now-a-days because of the work load).
>>>>> But It will be good - if you can please test the patch on all the platform
>>>>> (specially on windows) with quote in the name for table, user-name, etc
>>>>> before applying this patch.
>>>>
>>>> I did quite a lot of tests:
>>>>
>>>> * on Linux
>>>>
>>>> ticket266=# \d
>>>> List of relations
>>>> Schema | Name | Type | Owner
>>>> --------+------+-------+-----------
>>>> S"1 | TN5 | table | guillaume
>>>> S"1 | tn2 | table | guillaume
>>>> public | T1 | table | guillaume
>>>> public | t"3 | table | guillaume
>>>> public | t2 | table | guillaume
>>>> (5 rows)
>>>>
>>>> * on Windows, much more but I don't have the list here (I created
>>>> tables like t1, t"1, t "1, t" 1, t " 1, and the same for schemas)
>>>>
>>>> I'll try to have a set of tests to try on the different platforms.
>>>> Unfortunately, I still can't test on MacOSX.
>>>>
>>>
>>> I checked on Linux and Windows, and it works great on both. If someone
>>> can try my patch on Mac OS X, you'll find attached a custom (-Fc) backup
>>> of a small database with every kind of strangely named objects.
>>
>> I tried backing up all the oddly named tables on OSX, and didn't get any errors.
>>
>
> So it works on each supported platform that I know of. Unless there is
> tests I forgot to do, I'm inclined to commit this. Any last minute
> objections?
>

Commited.

--
Guillaume
http://www.postgresql.fr
http://dalibo.com

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Guillaume Lelarge 2010-11-23 11:18:10 pgAdmin III commit: Fix an issue with naming objects for backup
Previous Message pgAdmin Trac 2010-11-23 11:11:46 Re: [pgAdmin III] #266: Unable to backup table when quotation marks used in the name