Re: Broken sql string?

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: Broken sql string?
Дата
Msg-id FED2B709E3270E4B903EB0175A49BCB10475AB@dogbert.vale-housing.co.uk
обсуждение исходный текст
Ответы Re: Broken sql string?
Список pgadmin-hackers
 
-----Original Message-----
From: Mark A. Taff [mailto:mark@libertycreek.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.

В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Salil Mohanty
Дата:
Сообщение: Re: backup plugin
Следующее
От: Dave Page
Дата:
Сообщение: Re: backup plugin