Re: char columns, space padding, and the "like" operator - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: char columns, space padding, and the "like" operator
Date
Msg-id 10866.1233621826@sss.pgh.pa.us
Whole thread Raw
In response to Re: char columns, space padding, and the "like" operator  ("Haszlakiewicz, Eric" <EHASZLA@transunion.com>)
List pgsql-interfaces
"Haszlakiewicz, Eric" <EHASZLA@transunion.com> 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


pgsql-interfaces by date:

Previous
From: "Haszlakiewicz, Eric"
Date:
Subject: Re: char columns, space padding, and the "like" operator
Next
From: Bob Henkel
Date:
Subject: C Stored Function with ECPG