Re: BUG #4421: convert_to() should be immutable - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #4421: convert_to() should be immutable
Date
Msg-id 16256.1221741071@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #4421: convert_to() should be immutable  (Andreas Peer <andipeer@gmx.net>)
Responses Re: BUG #4421: convert_to() should be immutable
List pgsql-bugs
Andreas Peer <andipeer@gmx.net> writes:
> Well, the use case is a strange one... I would like to use a varchar()
> column for storing a variable-length vector of integers. The numbers are
> represented by the codepoints. Therefore, I need to sort them as binary
> data, not as characters. I would often need to get all the vectors that
> lie in between to vectors, therefore I need the "binary" index.

Use bytea maybe?

> And the code should be as database independent as possible, therefore I
> cannot use an array or another data type that may not be supported by
> other DBMS.

I can't imagine how you'd think that a functional index on convert_to()
would be the most portable solution ...

            regards, tom lane

pgsql-bugs by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: [HACKERS] 0x1A in control file on Windows
Next
From: "Michael Ojukwu"
Date:
Subject: BUG #4424: Change PostGreSQL Password Affects