Re: [GENERAL] like query backslash

2007-01-15 Thread ksherlock
Sim Zacks wrote: > To retrieve the above example, I needed to query: > select * from filetable where filename like 'serverdir%' > > Is this a bug or is there a reason for this? > > Sim There's a reason. With like queries, if you want to search for the literal characters % or ? they

Re: [GENERAL] like query backslash

2007-01-14 Thread Shoaib Mir
This is how version below 8.2 used to handled backslashes, but with 8.2 you can now handle the backslashes using a setting in the postgresql.conf file: standard_conforming_strings (boolean) This controls whether ordinary string literals ('...') treat backslashes literally, as specified in the SQL

[GENERAL] like query backslash

2007-01-14 Thread Sim Zacks
select version() "PostgreSQL 8.0.1 on i686-pc-linux-gnu, compiled by GCC i686-pc-linux-gnu-gcc (GCC) 3.3.5 (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1)" I have a table with UNC filename values (windows), such as \\server\dir\fname.txt I am running a like query to find all files on a spec