Re: adding a C function with optional arguments

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jim Mercer <jim(at)pneumonoultramicroscopicsilicovolcanoconiosis(dot)ca>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: adding a C function with optional arguments
Date: 2000-12-15 04:29:31
Message-ID: 10063.976854571@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jim Mercer <jim(at)pneumonoultramicroscopicsilicovolcanoconiosis(dot)ca> writes:
> i was wondering if someone could tell me how, if possible, to implement
> a c function such that i can do:

>> SELECT makecrypt('secret', 'salt');
> or
>> SELECT makecrypt('secret');

> such that if salt is not specified, the c function would make one up.

This would be two separate functions in Postgres' view of the world.
Whether one calls the other internally is between you and your code...

regards, tom lane

PS: pneumonoultramicroscopicsilicovolcanoconiosis? Wazzat?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dan Wilson 2000-12-15 05:27:46 Re: Trigger/Function problem
Previous Message Tom Lane 2000-12-15 03:51:38 Re: create trigger (can't compile example, problem with include files)