adding a C function with optional arguments

From: Jim Mercer <jim(at)pneumonoultramicroscopicsilicovolcanoconiosis(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: adding a C function with optional arguments
Date: 2000-12-14 20:39:02
Message-ID: 20001214153901.K11043@pneumonoultramicroscopicsilicovolcanoconiosis.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


i've poked about and made a new function "makecrypt(plainpass, salt)", and
it works ok.

basically, it is just a hook to the unix crypt() function.

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.

--
[ Jim Mercer jim(at)pneumonoultramicroscopicsilicovolcanoconiosis(dot)ca ]
[ Reptilian Research -- Longer Life through Colder Blood ]
[ aka jim(at)reptiles(dot)org +1 416 410-5633 ]

Responses

Browse pgsql-general by date

  From Date Subject
Next Message npat 2000-12-14 21:14:55 is libpq thread-safe?
Previous Message Joel Burton 2000-12-14 20:14:48 Re: [HACKERS] How to import/export data from/to an ASCII file?