pg.ddx.io  pgsql-benchmarks@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Adding funtions to postgresql (Not - )e: Please Help: PostgreSQL Query Optimizer
3+ messages / 3 participants
[nested] [flat]

* Adding funtions to postgresql (Not - )e: Please Help: PostgreSQL Query Optimizer
@ 2005-12-11 23:45 Hannu Krosing <hannu@skype.net>
  2005-12-12 00:02 ` Re: Adding funtions to postgresql (Not - )e: Please Help: Andrew Dunstan <andrew@dunslane.net>
  2005-12-12 02:36 ` Re: Adding funtions to postgresql (Not - )e: Please Help: Carlos Moreno <moreno@mochima.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Hannu Krosing @ 2005-12-11 23:45 UTC (permalink / raw)
  To: Carlos Moreno <moreno@mochima.com>; +Cc: pgsql-hackers@postgresql.org

Ü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'm interested in adding additional hash functions -- PG supports, as part
> of the built-in SQL functions, MD5 hashing.  So, for instance, I can simply
> type, at a psql console, the following:
> 
> select md5('abc');
> 
> 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.

----------------
Hannu





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Adding funtions to postgresql (Not - )e: Please Help:
  2005-12-11 23:45 Adding funtions to postgresql (Not - )e: Please Help: PostgreSQL Query Optimizer Hannu Krosing <hannu@skype.net>
@ 2005-12-12 00:02 ` Andrew Dunstan <andrew@dunslane.net>
  1 sibling, 0 replies; 3+ messages in thread

From: Andrew Dunstan @ 2005-12-12 00:02 UTC (permalink / raw)
  To: Hannu Krosing <hannu@skype.net>; +Cc: pgsql-hackers@postgresql.org



Hannu Krosing wrote:

>Ask your question as a separate post, not as an answer t another
>thread :)
>
>  
>

Also, if you post to a mailing list, you should have the courtesy to 
arrange it so your spam filter does not reject  replies.

cheers

andrew



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Adding funtions to postgresql (Not - )e: Please Help:
  2005-12-11 23:45 Adding funtions to postgresql (Not - )e: Please Help: PostgreSQL Query Optimizer Hannu Krosing <hannu@skype.net>
@ 2005-12-12 02:36 ` Carlos Moreno <moreno@mochima.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Carlos Moreno @ 2005-12-12 02:36 UTC (permalink / raw)
  To: Hannu Krosing <hannu@skype.net>; +Cc: pgsql-hackers@postgresql.org

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
--




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2005-12-12 02:36 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-12-11 23:45 Adding funtions to postgresql (Not - )e: Please Help: PostgreSQL Query Optimizer Hannu Krosing <hannu@skype.net>
2005-12-12 00:02 ` Re: Adding funtions to postgresql (Not - )e: Please Help: Andrew Dunstan <andrew@dunslane.net>
2005-12-12 02:36 ` Re: Adding funtions to postgresql (Not - )e: Please Help: Carlos Moreno <moreno@mochima.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox