On Fri, Feb 22, 2008 at 8:12 PM, Greg Stark <stark@xxxxxxxxxxxxxxxx> wrote:
You could use hashtext() which is Postgres's internal hash function.
Awesome!
There's some possibility it could change in future versions of Postgres
though.
I can live with that, especially if all that changes is the implementation, and not its availability. The use I have in mind is strictly internal, so the possibility that a given string may get a different hashkey if PostgreSQL gets upgraded is no problem at all.
Thanks for the pointer! It's not in the docs, so I would have never found it on my own... (It makes me wonder what other "hidden" PostgreSQL goodies are out there. I know, I know, peeking behind the published API is evil... I guess I'm a geek "in a state of sin", to use von Neumann's terms...)
kynn