[GENERAL] Case of strings
Hi I have moved an application from MySQL to PgSQL, and after the making changes I thought all was ok. However, I have just realised that Where A = STRING Is not the same as Where A =String Is there anyway I can force the PgSQL to accept case equivalence, or must I add upper()/lower() to force the case and then make string tests? Ie Where upper(A)=upper(String) Many thanx Simon Simon Windsor Eml: [EMAIL PROTECTED] Tel: 01454 617689 Mob: 07960 321599 -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. Mailscanner thanks transtec Computers for their support.
Re: [GENERAL] Case of strings
Is there anyway I can force the PgSQL to accept case equivalence, or must I add upper()/lower() to force the case and then make string tests? Ie Where upper(A)=upper('String') I think you already answered your own question as pgsql document does in section 9.4. String Functions and Operators Regards, CN ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [GENERAL] Case of strings
On Fri, Feb 27, 2004 at 12:06:58PM -, Simon Windsor wrote: Hi I have moved an application from MySQL to PgSQL, and after the making changes I thought all was ok. However, I have just realised that Where A = 'STRING' Is not the same as Where A ='String' This is standard SQL. It's possible to use functions inside index definitions, so you can force case and search on the same. Michael -- Michael Darrin Chaney [EMAIL PROTECTED] http://www.michaelchaney.com/ ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [GENERAL] Case of strings
On 27/02/2004 12:06 Simon Windsor wrote: Is there anyway I can force the PgSQL to accept case equivalence, or must I add upper()/lower() to force the case and then make string tests? Ie Where upper(A)=upper('String') You could use ilike where a ilike 'string' You can also use POSIX regular expressions. -- Paul Thomas +--+-+ | Thomas Micro Systems Limited | Software Solutions for the Smaller Business | | Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk | +--+-+ ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly