Re: adding a C function with optional arguments

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: adding a C function with optional arguments
Дата
Msg-id 10063.976854571@sss.pgh.pa.us
обсуждение исходный текст
Ответ на adding a C function with optional arguments  (Jim Mercer <jim@pneumonoultramicroscopicsilicovolcanoconiosis.ca>)
Список pgsql-general
Jim Mercer <jim@pneumonoultramicroscopicsilicovolcanoconiosis.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?

В списке pgsql-general по дате отправления:

Предыдущее
От: "Dan Wilson"
Дата:
Сообщение: Re: Trigger/Function problem
Следующее
От: Maarten Boekhold
Дата:
Сообщение: RE: Postgres failover implementation