From: | Dave Page <dpage(at)pgadmin(dot)org> |
---|---|
To: | Martin French <Martin(dot)French(at)romaxtech(dot)com> |
Cc: | pgadmin-hackers(at)postgresql(dot)org, pgadmin-hackers-owner(at)postgresql(dot)org |
Subject: | Re: pgAgent Database Name Limitation |
Date: | 2012-09-04 11:05:23 |
Message-ID: | CA+OCxowh2pxBvEdq2VajPHvWeP58V_mcs1SpgzeNX9=3UmiCpA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
On Tue, Sep 4, 2012 at 12:00 PM, Martin French
<Martin(dot)French(at)romaxtech(dot)com> wrote:
>
>> > connInfo connInfo::getConnectionInfo(wxString connStr)
>> > {
>> > connInfo cnInfo;
>> >
>> > wxRegEx propertyExp;
>> >
>> > // Remove the white-space(s) to match the following format
>> > // i.e. prop=value
>> > bool res = propertyExp.Compile(wxT("(([ ]*[\t]*)+)="));
>> >
>> > propertyExp.ReplaceAll(&connStr, wxT("="));
>> >
>> > res = propertyExp.Compile(wxT("=(([ ]*[\t]*)+)"));
>> > propertyExp.ReplaceAll(&connStr, wxT("="));
>> >
>> > // Seperate all the prop=value patterns
>
>> > wxArrayString tokens = wxStringTokenize(connStr, wxT("\t
>> > \n\r"));
>
>
>> > [...]
>
>
>>
>> The correct fix would be to modify the regexp so it doesn't strip
>> spaces inside of quoted sub-strings. Not sure my regexp-fu is that
>> strong though, so please feel free to work on it :-)
>>
>
>
>
> There's a couple of things going on here Dave that I can't seem to get
> around at the moment. The wxStringTokenize actually destroys the string, so
> I'm going to do a little work here to see if i can fix and allow libpq style
> string quoting! (my regexp-fu is appalling to say the least! ;-) )
>
> Wish me luck...
Good luck :-). Feel free to post here if you need advice; we'll help
out if we can.
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Sachin Srivastava | 2012-09-04 17:14:50 | Unable to create new function if "Owner" or "Comment" is specified. |
Previous Message | Dave Page | 2012-09-04 11:02:06 | Re: little patch for "Detect serial columns from pg_depend" and bugfix |