From: | "Kynn Jones" <kynnjo(at)gmail(dot)com> |
---|---|
To: | "Greg Stark" <stark(at)enterprisedb(dot)com> |
Cc: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: PostgreSQL's hashing function? |
Date: | 2008-02-23 13:41:38 |
Message-ID: | c2350ba40802230541x116714e6n61e2b01a97940dc1@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Feb 22, 2008 at 8:12 PM, Greg Stark <stark(at)enterprisedb(dot)com> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Jorge Godoy | 2008-02-23 13:47:43 | Re: need some help on figuring out how to write a query |
Previous Message | Kynn Jones | 2008-02-23 13:28:57 | Re: Queries w/ "computed" table names? (eval in Pg?) |