X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id F34CA9DCAC3 for ; Sun, 11 Dec 2005 22:19:36 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 92849-10 for ; Sun, 11 Dec 2005 22:19:40 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by postgresql.org (Postfix) with ESMTP id F32F69DCAC2 for ; Sun, 11 Dec 2005 22:19:34 -0400 (AST) Received: from [192.168.0.2] ([70.80.114.202]) by VL-MO-MR002.ip.videotron.ca (Sun Java System Messaging Server 6.2-2.05 (built Apr 28 2005)) with ESMTP id <0IRD00JIB54QH5I0@VL-MO-MR002.ip.videotron.ca> for pgsql-hackers@postgresql.org; Sun, 11 Dec 2005 21:19:39 -0500 (EST) Date: Sun, 11 Dec 2005 21:36:29 -0500 From: Carlos Moreno Subject: Re: Adding funtions to postgresql (Not - )e: Please Help: In-reply-to: <1134344727.3567.53.camel@localhost.localdomain> To: Hannu Krosing Cc: pgsql-hackers@postgresql.org Message-id: <439CE22D.70609@mochima.com> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 8BIT X-Accept-Language: en-us, en References: <200512111126.18566.josh@agliodbs.com> <439CAE4D.2030208@mochima.com> <1134344727.3567.53.camel@localhost.localdomain> User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200512/575 X-Sequence-Number: 77423 Hannu Krosing wrote: >Ühel kenal päeval, P, 2005-12-11 kell 17:55, kirjutas Carlos Moreno: > >>Hi, >> >>I'm very new to this list -- I've been using and advocating PostgreSQL for >>no less than 4 or 5 years now, and have participated in some of the other >>mailing lists, but never on this one. >> >>My question is (short version): how would one go about adding a new >>(built-in) function to PostgreSQL? >> > >Ask your question as a separate post, not as an answer t another >thread :) > I know... Sorry -- My brain must have temporarily shut down when I was posting. Wrong subject, wrong link to the rest of the messages... :-( > My "feature request" (which again, I'd like to implement it myself) would > >>be the ability to do: >> >>select sha1('xyz'), sha256('etc'); >> >>(At least these two -- maybe for completeness it would be good to have >>sha224, 384, and 512, but I guess SHA1 and SHA-256 would be a very good >>and sound starting point) >> > >Take a look at the pgcrypto contrib module (in src/contrib/pgcrypto ) > >Not only does it show how to add functions, but it also provides many of >the ones you need. > Ok. Will do. Thanks for the pointer! Carlos --