Re: char columns, space padding, and the "like" operator

Tom Lane <[email protected]> Mon, 02 Feb 2009 19:43:46 -0500
Newsgroups gmane.comp.db.postgresql.interfaces
Message-ID <[email protected]>
"Haszlakiewicz, Eric" <[email protected]> writes:
>> Cast the char(n) column to text or varchar, and it should work more
>> like you're expecting.

> Yeah, I figured that much.  I was hoping for a connection-wide or
> database-wide setting, so I wouldn't have to go change all my SQL
> statements.

Well, you could experiment with removing the char(n) variant of the ~~
operator, but if it breaks you get to keep both pieces.

			regards, tom lane

-- 
Sent via pgsql-interfaces mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-interfaces