Re: Import: empty string and expression - Mailing list pgadmin-hackers

From Quan Zongliang
Subject Re: Import: empty string and expression
Date
Msg-id 20090226180116.3B87.4125B4E5@gmail.com
Whole thread Raw
In response to Re: Import: empty string and expression  (Dave Page <dpage@pgadmin.org>)
Responses Re: Import: empty string and expression  (Dave Page <dpage@pgadmin.org>)
List pgadmin-hackers
> Right - so why do we need to escape anything in the expression?
> Shouldn't the user just be able to free-type whatever they want (in
> the same way they would if they were writing the expression as part of
> a query in the Query Tool?
I have to convert column names in expression to data for every row
before generate statement. Without escape char, I don't know
what is column-name, what is lexical. Once the user want to input
a lexical same as one of column-names, confusion occur.

For example, with CSV row "A1,B1,C1,D1":
'Column #1' || <Column #3> will be converted to 'Column #1' || 'C1'
The first is a lexical, the second is CSV column.

But 'Column #1' || Column #3 can't be converted properly.


-----------------------------------------------
Quan Zongliang
quanzongliang@gmail.com
CIT Japan:  http://www.cit.co.jp
CIT China:  http://www.citbj.com.cn


pgadmin-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: Import: empty string and expression
Next
From: Dave Page
Date:
Subject: Re: Import: empty string and expression