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

Re: BUG #4421: convert_to() should be immutable

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andreas Peer <andipeer(at)gmx(dot)net>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4421: convert_to() should be immutable
Date: 2008-09-18 12:31:11
Message-ID: 16256.1221741071@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Andreas Peer <andipeer(at)gmx(dot)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

In response to

Responses

pgsql-bugs by date

Next:From: Michael OjukwuDate: 2008-09-18 15:56:33
Subject: BUG #4424: Change PostGreSQL Password Affects
Previous:From: Magnus HaganderDate: 2008-09-18 11:17:53
Subject: Re: [HACKERS] 0x1A in control file on Windows

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