Re: pgAgent Database Name Limitation

From: Martin French <Martin(dot)French(at)romaxtech(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
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:00:38
Message-ID: OF2B382405.88B3E115-ON80257A6F.003C3A2A-80257A6F.003C7BBF@romaxtech.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

> > 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...

Cheers

Martin
=============================================

Romax Technology Limited
Rutherford House
Nottingham Science & Technology Park
Nottingham,
NG7 2PZ
England

Telephone numbers:
+44 (0)115 951 88 00 (main)

For other office locations see:
http://www.romaxtech.com/Contact
=================================
===============
E-mail: info(at)romaxtech(dot)com
Website: www.romaxtech.com
=================================

================
Confidentiality Statement
This transmission is for the addressee only and contains information that
is confidential and privileged.
Unless you are the named addressee, or authorised to receive it on behalf
of the addressee
you may not copy or use it, or disclose it to anyone else.
If you have received this transmission in error please delete from your
system and contact the sender. Thank you for your cooperation.
=================================================

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2012-09-04 11:02:06 Re: little patch for "Detect serial columns from pg_depend" and bugfix
Previous Message Dave Page 2012-09-04 10:55:14 Re: patch for "Sequence: calculate next value to be expected"