Re: Question about Encoding a Custom Type - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: Question about Encoding a Custom Type
Date
Msg-id 3C063566-6F6F-4FA7-AEBE-3DE4B9DFC922@kineticode.com
Whole thread Raw
In response to Re: Question about Encoding a Custom Type  ("David E. Wheeler" <david@kineticode.com>)
Responses Re: Question about Encoding a Custom Type  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Jun 16, 2008, at 09:24, David E. Wheeler wrote:

> On Jun 16, 2008, at 02:52, Martijn van Oosterhout wrote:
>
>> The only odd thing I see is the use of PG_ARGS to pass the
>> arguments to
>> citextcmp. But I can't see why it would break either. Can you
>> attach a
>> debugger and see where it goes wrong?
>
> Yes, I can do that, although I'm pretty new to C (let alone gdb), so
> I'm not sure exactly how to go about it. I'll try to get on IRC
> later today to see if anyone can help me along.

What's even weirder is that it can not work and then suddenly work:

try=# select citext_smaller( 'aardvark'::citext, 'AARDVARK'::citext );
ERROR:  invalid byte sequence for encoding "UTF8": 0xe02483
HINT:  This error can also happen if the byte sequence does not match
the encoding expected by the server, which is controlled by
"client_encoding".
try=# select citext_smaller( 'aardvark'::citext, 'AARDVARK'::citext ); citext_smaller
---------------- AARDVARK
(1 row)

WTF? Logging onto IRC now…
  https://svn.kineticode.com/citext/trunk/

Best,

David



pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Core team statement on replication in PostgreSQL
Next
From: Tom Lane
Date:
Subject: Re: Question about Encoding a Custom Type