Skip site navigation (1) Skip section navigation (2)

Re: Text comparison suddenly can't find collation?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Johann 'Myrkraverk' Oskarsson" <johann(at)2ndquadrant(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Text comparison suddenly can't find collation?
Date: 2012-01-13 15:43:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
"Johann 'Myrkraverk' Oskarsson" <johann(at)2ndquadrant(dot)com> writes:
> Why would a string comparison work in one case and not another?  In
> the following example, it works to compare a and b, but not a and d.

> This is in a C module which calls
>   DirectFunctionCall2( text_le, d1, d2 );

As of 9.1, I'd expect that coding to fail every time.  text_le needs to
be passed a collation, and you aren't doing so.  You need to be using

Where to get the collation from might be an interesting question too,
but without more context it's hard to guess what will be appropriate for

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Kevin GrittnerDate: 2012-01-13 16:00:32
Subject: Re: TG_DEPTH patch v1
Previous:From: Peter GeogheganDate: 2012-01-13 15:41:45
Subject: Re: show Heap Fetches in EXPLAIN for index-only scans

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group