Re: [GENERAL] Case sensitivity

2013-12-12 Thread Dev Kumkar
On Thu, Dec 12, 2013 at 12:47 PM, Dev Kumkar wrote: > + hackers > > > > On Thu, Dec 12, 2013 at 12:34 PM, Dev Kumkar wrote: > >> On Wed, Dec 11, 2013 at 9:47 PM, Dev Kumkar wrote: >> >>> Actually for searches lower will work. >>> But the other important aspect is 'inserts' which would result 2 row

Re: [GENERAL] Case sensitivity

2013-12-11 Thread Dev Kumkar
+ hackers On Thu, Dec 12, 2013 at 12:34 PM, Dev Kumkar wrote: > On Wed, Dec 11, 2013 at 9:47 PM, Dev Kumkar wrote: > >> Actually for searches lower will work. >> But the other important aspect is 'inserts' which would result 2 rows if >> the values are 'A' and 'a'. Intent here to have it case in

Re: [GENERAL] Case sensitivity

2013-12-11 Thread Dev Kumkar
On Wed, Dec 11, 2013 at 9:47 PM, Dev Kumkar wrote: > Actually for searches lower will work. > But the other important aspect is 'inserts' which would result 2 rows if > the values are 'A' and 'a'. Intent here to have it case insensitive. > > If CITEXT it will update the same row and works. > CITE

Re: [GENERAL] Case sensitivity

2013-12-11 Thread Dev Kumkar
Actually for searches lower will work. But the other important aspect is 'inserts' which would result 2 rows if the values are 'A' and 'a'. Intent here to have it case insensitive. If CITEXT it will update the same row and works. CITEXT is an alternative but was wondering if there is any other alt

Re: [GENERAL] Case sensitivity

2013-12-11 Thread Andrew Sullivan
On Wed, Dec 11, 2013 at 04:55:07PM +0530, Dev Kumkar wrote: > creating database. I have been looking at other discussions and doesn't > look like anything of that coming up soon that makes database case > insensitive. You could build lower() indexes on any column you want to search CI and lower()

Re: [GENERAL] Case sensitivity

2013-12-11 Thread Dev Kumkar
Can case-insensitive collation help here? On Wed, Dec 11, 2013 at 4:55 PM, Dev Kumkar wrote: > Thanks John. > > Yes CITEXT would work, the only thing its needs DDL changes across and > hence was looking for any such global database parameter setting while > creating database. I have been lookin

Re: [GENERAL] Case sensitivity

2013-12-11 Thread Dev Kumkar
Thanks John. Yes CITEXT would work, the only thing its needs DDL changes across and hence was looking for any such global database parameter setting while creating database. I have been looking at other discussions and doesn't look like anything of that coming up soon that makes database case inse

Re: [GENERAL] Case sensitivity

2013-12-10 Thread John R Pierce
On 12/10/2013 10:31 PM, Dev Kumkar wrote: I know about CITEXT data type, but what am looking for is if there any parameter at database level which just makes the database case insensitive. there's nothing that will do that in postgres. whats wrong with using CITEXT ? -- john r pierce

Re: [GENERAL] case sensitivity?

2011-06-06 Thread Andrew Sullivan
On Mon, Jun 06, 2011 at 10:24:45PM +0200, Heine Ferreira wrote: > I basicically want to avoid using upper in comparisons. > Has anyone tried this? > Do you know if this will work? There's a contrib module that will allow you to do this. See the citext datatype. A -- Andrew Sullivan a...@crank

Re: [GENERAL] case sensitivity?

2011-06-06 Thread Scott Marlowe
On Mon, Jun 6, 2011 at 2:24 PM, Heine Ferreira wrote: > Hi > > I posted a similar question before. I was told that Postgres is always case > sensitive. > I was actually referring to text data not identifiers. > I mean char and varchar fields. > I basicically want to avoid using upper in comparison

Re: [GENERAL] Case Sensitivity

2011-01-13 Thread Andrew Sullivan
On Thu, Jan 13, 2011 at 03:29:03PM -, Phillip Smith wrote: > modifying user inputted data is not an option for me. I need to > maintain the original data. I had read about indexing on a lower > function. This all seems a bit of a bodgy workaround to me. A clean > Case Insensitive collation set

Re: [GENERAL] Case Sensitivity

2011-01-13 Thread Pavel Stehule
2011/1/13 Phillip Smith : > Thanks Pavel, > > Is this the only way?. I would prefer to use a collation setting if this is > possible. Do you know whether there would be a performance hit using non > standard character strings? It is preferred way. PostgreSQL doesn't support a collations, and what

Re: [GENERAL] Case Sensitivity

2011-01-13 Thread Phillip Smith
Hi Karsten, modifying user inputted data is not an option for me. I need to maintain the original data. I had read about indexing on a lower function. This all seems a bit of a bodgy workaround to me. A clean Case Insensitive collation setting is cleaner. Is this supported in postgreSQL 9? R

Re: [GENERAL] Case Sensitivity

2011-01-13 Thread Phillip Smith
Thanks Pavel, Is this the only way?. I would prefer to use a collation setting if this is possible. Do you know whether there would be a performance hit using non standard character strings? Phillip

Re: [GENERAL] Case Sensitivity

2011-01-13 Thread Karsten Hilbert
> you should to use a citext datatype > > http://www.postgresql.org/docs/9.0/interactive/citext.html Or: - use a functional index with lower() to ensure uniqueness - use a BEFORE trigger to lower() the inserted data Karsten -- GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit gratis Handy-Fl

Re: [GENERAL] Case Sensitivity

2011-01-13 Thread Pavel Stehule
Hello you should to use a citext datatype http://www.postgresql.org/docs/9.0/interactive/citext.html regards Pavel Stehule 2011/1/13 Phillip Smith : > Hi, > I'm moving over from MS SQL. I've been googling this for ages now and > suprisingly cannot find a clear answer. > > I want my data in tab

Re: [GENERAL] Case sensitivity problems with user name

2009-03-24 Thread Raymond O'Donnell
On 24/03/2009 20:38, Will Rutherdale (rutherw) wrote: > Pardon my newness to Postgres. We've all been there at some point! - except of course for Tom Lane. :-) Ray. -- Raymond O'Donnell, Director of Music, Galway Cathedral, Irelan

Re: [GENERAL] Case sensitivity problems with user name

2009-03-24 Thread Will Rutherdale (rutherw)
herdale (rutherw) Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Case sensitivity problems with user name Will Rutherdale (rutherw) wrote: > When I try going into psql as user postgres to change the user name, I > get this problem: > > postgres=# alter user mickey rename to

Re: [GENERAL] Case sensitivity problems with user name

2009-03-24 Thread John R Pierce
Will Rutherdale (rutherw) wrote: When I try going into psql as user postgres to change the user name, I get this problem: postgres=# alter user mickey rename to Mickey; ERROR: role “mickey” already exists you might try... alter user "mickey" rename to "Mickey"; -- Sent via pgsql-genera

Re: [GENERAL] Case sensitivity?

2005-12-27 Thread Devrim GUNDUZ
Hi, On Tue, 2005-12-27 at 15:54 -0800, dfx wrote: > How I can set case-insensitive the system, or avoid the conversion to > lower case? You need to double-quote the object names that you don't want to be converted to lower case, like CREATE TABLE "DevrimGunduz". Regards, -- The PostgreSQL Compa

Re: [GENERAL] Case sensitivity?

2005-12-27 Thread John McCawley
Well, the rule is very simple, either always quote your identifiers, or never quote them. If you always quote them, then you always need to specify them in the same case. If you never quote them, then you always get case-insensetivity. My memory is a little hazy, as it's been a few years, but

Re: [GENERAL] Case sensitivity?

2005-12-27 Thread Martijn van Oosterhout
On Tue, Dec 27, 2005 at 09:14:20AM -0600, John McCawley wrote: > Due to case weirdness in Postgres, particularly when accessing it from > PHP, I completely abandoned mixed case table and column names. I don't > know if things have changed in the past several years, but when I first > made the l

Re: [GENERAL] Case sensitivity?

2005-12-27 Thread John McCawley
Due to case weirdness in Postgres, particularly when accessing it from PHP, I completely abandoned mixed case table and column names. I don't know if things have changed in the past several years, but when I first made the leap, mixed case was more trouble than it was worth. Even after I got

Re: [GENERAL] Case sensitivity?

2005-12-27 Thread Jaime Casanova
On 12/27/05, dfx <[EMAIL PROTECTED]> wrote: > Dear Sirs, > > I have a little problem: > > - Contest: Server side: Linux Fedora core 4 with PostgreSQL v. 8.0 > Client side: both Linux Fedora core 4 with pgAdmin III v. > 1.4 and/or Windows 2000 server vith pgAdmin III v. 1.4 > > - I M

Re: [GENERAL] Case sensitivity?

2005-12-27 Thread Lic. Martin Marques
On Tue, 27 Dec 2005, dfx wrote: Dear Sirs, I have a little problem: - Contest: Server side: Linux Fedora core 4 with PostgreSQL v. 8.0 Client side: both Linux Fedora core 4 with pgAdmin III v. 1.4 and/or Windows 2000 server vith pgAdmin III v. 1.4 - I Made a table: CREATE TABL

Re: [GENERAL] Case sensitivity

2005-08-10 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-08-10 13:18:32 +0200: > 1. Will SELECT WHERE LOWER(colname) = 'a001' use the index, or must I create > a separate index on LOWER(colname)? the latter -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you we

Re: [GENERAL] Case sensitivity

2005-08-10 Thread John D. Burger
To handle searching for a row based on a string, I will use "LOWER(colname) = 'x'" and "LOWER(colname) LIKE 'x%'". AFAICT, the second one is equivalent to "colname ILIKE 'x%'", provided I force 'x' to lowercase first. I would strongly suggest you do this instead: LOWER(colname) = LOWER('x')

Re: [GENERAL] Case sensitivity

2005-08-10 Thread Frank Millman
Frank Millman wrote: > 1. Will SELECT WHERE LOWER(colname) = 'a001' use the index, or must I create a separate index on LOWER(colname)? Sorry. RTFM. The docs clearly state that this is necessary. Frank ---(end of broadcast)--- TIP 6: explain ana

Re: [GENERAL] Case sensitivity

2005-08-10 Thread Frank Millman
Frank Millman wrote: > Hi all > > Is there an LC_COLLATE setting, or any other method, which allows all > data in a database to be treated in a case-insensitive manner? > Thanks for all the replies, guys, I really appreciate it. Here is what I have decided to do. If anyone sees any problems w

Re: [GENERAL] Case sensitivity

2005-08-09 Thread Martijn van Oosterhout
On Tue, Aug 09, 2005 at 11:02:47AM -0400, Tom Lane wrote: > Martijn van Oosterhout writes: > > Another option would be to create a new datatype 'itext' which works > > like text except it compares case insensetively. PostgreSQL is flexible > > like that. Here's something to get you started, see be

Re: [GENERAL] Case sensitivity

2005-08-09 Thread Tom Lane
Martijn van Oosterhout writes: > Another option would be to create a new datatype 'itext' which works > like text except it compares case insensetively. PostgreSQL is flexible > like that. Here's something to get you started, see below for example. > http://svana.org/kleptog/pgsql/type_itext.sql

Re: [GENERAL] Case sensitivity

2005-08-09 Thread Richard Huxton
Frank Millman wrote: Frank Millman wrote: Hi all Is there an LC_COLLATE setting, or any other method, which allows all data in a database to be treated in a case-insensitive manner? I was hoping to stimulate some discussion on this topic, but it seems I will have to kick-start it myself a

Re: [GENERAL] Case sensitivity

2005-08-09 Thread Martijn van Oosterhout
On Tue, Aug 09, 2005 at 11:57:48AM +0200, Martijn van Oosterhout wrote: > Another option would be to create a new datatype 'itext' which works > like text except it compares case insensetively. PostgreSQL is flexible > like that. Here's something to get you started, see below for example. > > htt

Re: [GENERAL] Case sensitivity

2005-08-09 Thread Martijn van Oosterhout
On Tue, Aug 09, 2005 at 09:35:25AM +0200, Frank Millman wrote: > Frank Millman wrote: > > > Hi all > > > > Is there an LC_COLLATE setting, or any other method, which allows all > > data in a database to be treated in a case-insensitive manner? > > I was hoping to stimulate some discussion on th

Re: [GENERAL] Case sensitivity

2005-08-09 Thread Frank Millman
Frank Millman wrote: > Hi all > > Is there an LC_COLLATE setting, or any other method, which allows all > data in a database to be treated in a case-insensitive manner? I was hoping to stimulate some discussion on this topic, but it seems I will have to kick-start it myself and see if anyone re

Re: [GENERAL] Case sensitivity

2005-08-08 Thread Richard Huxton
Frank Millman wrote: Hi all Is there an LC_COLLATE setting, or any other method, which allows all data in a database to be treated in a case-insensitive manner? I have two scenarios in mind. There are workarounds for both of them, but it would be nice if they were not necessary. 1. In a UNIQUE

Re: [GENERAL] Case sensitivity

2005-06-13 Thread Howard Cole
Tom, Magnus. Thanks for the great support. Howard Cole www.selestial.com Magnus Hagander wrote: Are there any plans for fixing the UNICODE encoding on Windows? Yes. There is a patch floating around to use ICU, which will fix this (amongst the other things it does). The hope is that it'

Re: [GENERAL] Case sensitivity

2005-06-13 Thread Magnus Hagander
> I looked into the problem further - and could not repeat the > problem on my windows XP machine. The problem was isolated to > a server which uses the 64bit edition of W2K3 server. > Otherwise the W2K3 64bit edition seems to run PG ok. > > Are there any plans for fixing the UNICODE encoding o

Re: [GENERAL] Case sensitivity

2005-06-13 Thread Howard Cole
I looked into the problem further - and could not repeat the problem on my windows XP machine. The problem was isolated to a server which uses the 64bit edition of W2K3 server. Otherwise the W2K3 64bit edition seems to run PG ok. Are there any plans for fixing the UNICODE encoding on Windows?

Re: [GENERAL] Case sensitivity

2005-06-12 Thread Tom Lane
Howard Cole <[EMAIL PROTECTED]> writes: > Has case sensitivity changed between 8.0.1 and 8.0.3 Nope. > Results on 8.0.3 windows server (UNICODE) Unicode doesn't work at all well on Windows. Consider using a different encoding. Also, you'd better check that you have matching locale and encoding

Re: [GENERAL] Case sensitivity

2005-06-12 Thread Magnus Hagander
> create table test (val varchar(10)); > insert into test values ('A'); > insert into test values ('a'); > select * from test where val < 'a'; > > Results on 8.0.1 linux server (UNICODE) > val > - > (0 rows) > > Results on 8.0.3 windows server (UNICODE) val > - > A > (1 row) > > I am

Re: [GENERAL] Case sensitivity

2004-05-15 Thread David Garamond
Jason Tesser wrote: I am converting data from Access into Postgres and ran into an issue with case sensitivity. Can I write queries in Access that will be case insensitive without rewriting the queries. So I would like to know if this be handled in Postgres or even if someone knows in Access. Tha

Re: [GENERAL] Case sensitivity

2004-01-12 Thread scott.marlowe
On Mon, 12 Jan 2004, Richard Huxton wrote: > On Sunday 11 January 2004 09:29, Dario Ottaviano wrote: > > I use postgres on a window server (IIS 5.1) > > Is there anybody that knows if is possible to make postgres no case > > sensitive in the manipulating data into tables/views? > > There's no g

Re: [GENERAL] Case sensitivity

2004-01-12 Thread Richard Huxton
On Sunday 11 January 2004 09:29, Dario Ottaviano wrote: > I use postgres on a window server (IIS 5.1) > Is there anybody that knows if is possible to make postgres no case > sensitive in the manipulating data into tables/views? There's no general "case_sensitive = yes/no" flag. There are case-in

Re: [GENERAL] Case sensitivity issue

2001-09-14 Thread Matthew Rice
Szabo Zoltan <[EMAIL PROTECTED]> writes: > Use: ILIKE > > > If I am doing a command such as > > select * from Apples where color like '%red%'; > > how do I make it case insensitive? I was trying to solve a similar problem where I wanted an exact match to work in PostgreSQL and MySQL and ended up

Re: [GENERAL] Case sensitivity issue

2001-09-14 Thread Patrik Kudo
select * from Apples where lower(color) like '%red%'; ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol Känns det oklart? Fråga på! On 9 Sep 2001, Michael Gay wrote: > If I am doing a command such as > > select * from Apples where color like '%red%'; > > how do I make it case i

Re: [GENERAL] Case sensitivity issue

2001-09-14 Thread Jeff Eckermann
use "ILIKE" instead of "LIKE" or use a regular expression match: ~* 'red' - Original Message - From: "Michael Gay" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, September 09, 2001 11:02 PM Subject: [GENERAL] Case sensitivity issue > If I am doing a command such as > > sele

Re: [GENERAL] Case sensitivity issue

2001-09-14 Thread Mitch Vincent
SELECT * FROM apples WHERE lower(color) LIKE '%red%'; Make sure that what ever 'red' might be is always lower case (you can pass it through lower() too, of course).. -Mitch - Original Message - From: "Michael Gay" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, September 10,

Re: [GENERAL] Case sensitivity

2001-08-14 Thread Digital Wokan
Very good book. I have the .pdf file of it from before they took it off the site. John Clark Naldoza y Lopez wrote: > > Hello Scott, > > PostgreSQL also supports regular expressions, _VERY_ useful..;-) > > ~* regular expression, case-insensitive..;-) > > Try to get a copy of Bruce's book >

Re: [GENERAL] Case sensitivity

2001-08-13 Thread John Clark Naldoza y Lopez
Hello Scott, PostgreSQL also supports regular expressions, _VERY_ useful..;-) ~* regular expression, case-insensitive..;-) Try to get a copy of Bruce's book Introduction and Concepts by Bruce Momjian A sample from the book: SELECT * FROM friend WHERE firstname ~* '[bc]' read it online,

Re: [GENERAL] Case sensitivity

2001-02-27 Thread Oliver Elphick
Bruce Richardson wrote: >Discovering that text fields in Postgres are case sensitive - so "Text" ><> "text" and both can go into the same UNIQUE column - threw me a bit, >as this is different from other databases I've worked with. Well, they are different, aren't they? >Is there a togg