Re: Broken sql string?

From: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
To: "'Mark A(dot) Taff'" <mark(at)libertycreek(dot)net>
Cc: "'pgadmin-hackers(at)postgresql(dot)org'" <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Broken sql string?
Date: 2002-02-19 12:37:53
Message-ID: FED2B709E3270E4B903EB0175A49BCB10475AB@dogbert.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers


-----Original Message-----
From: Mark A. Taff [mailto:mark(at)libertycreek(dot)net]
Sent: 19 February 2002 11:26
To: Dave Page
Subject: Broken sql string?

Dave,
Query sql strings taken from my new sql hbx cause the display
sub (from the sql output form, now cannibalized) to break if the string
contains vbCRLF. The string in question might be "SELECT *" & vbCRLF &
"FROM addresses"

The code searches for " FROM " to locate the from clause. Should it be
rewritten to allow for CRLF before any of the tokens, or do we need to first
parse the query string for CRLF and replace them with single spaces?

Hi Mark,

Please post this sort of message to the pgadmin-hackers list so everyone
knows what's going on :)

I guess you're talking about the behaviour of the HBX which won't colour the
FROM if it follows a crlf (sorry, the talk of cannibalized frmSQLOutput
threw me a bit)? If so, then yes, this is a bug. The problem with the HBX
though, is that *many* hours of work and testing have been put into it to
make it work as well as it does. We did have code that coloured better,
however it's very slow. This was the major problem - if you pasted in 20K of
SQL, then you had to wait quite some time for it to colour.

In answer to you question though, no, we should not modify the user's input
in any way. We used to replace crlf with spaces before sending queries to
the server, which was all fine and dandy until someone complained that the
PL/Perl function they wrote wouldn't work properly - because it had lost all
it's crlfs!!! If you can fix the HBX, or write a better version though, that
would be great.

Regards, Dave.

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2002-02-19 12:46:15 Re: backup plugin
Previous Message Dave Page 2002-02-19 12:01:57 Re: Hebrew support