From: | "Matthew Dennis" <mdennis(at)merfer(dot)net> |
---|---|
To: | PGSQL <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: aggregate hash function |
Date: | 2008-01-30 23:23:07 |
Message-ID: | e94d85500801301523v66d52264t53bbb7f2cfb0beb0@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Jan 30, 2008 4:40 PM, Vyacheslav Kalinin <vka(at)mgcp(dot)com> wrote:
> Most implementations of md5 internally consist of 3 functions: md5_init -
> which initializes internal context, md5_update - which accepts portions of
> data and processes them and md5_final - which finalizes the hash and
> releases the context. These roughly suit aggregate's internal functions
> (SFUNC and FINALFUNC, md5_init is probably to be called on first actual
> input). Since performance is important for you the functions should be
> written in low-level language as C, to me it doesn't look difficult to take
> some C md5 module and adapt it to be an aggregate... though it's not like I
> would do this easily myself :)
>
Yes, thank you, I'm aware of how MD5 works - that's precisely why I don't
like the idea of concatenating everything together first. I was hoping that
because PG already exposed an MD5 function that it used a stdlib and also
exposed the constituent functions and I just wasn't looking in the right
place for them. Assuming it did, it would be pretty trivial to use them for
SFUNC and FFUNC in creating an aggregate.
Thanks for the help.
From | Date | Subject | |
---|---|---|---|
Next Message | Jeremy Harris | 2008-01-30 23:30:00 | Re: enabling autovacuum |
Previous Message | Swaminathan Saikumar | 2008-01-30 23:11:05 | Is PostGreSql's Data storage mechanism "inferior"? |