Re: Persistent user-defined functions

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Persistent user-defined functions
Дата
Msg-id 20080328080335.GB9150@svana.org
обсуждение исходный текст
Ответ на Persistent user-defined functions  (David T <intrepid__x@hotmail.com>)
Список pgsql-general
On Thu, Mar 27, 2008 at 11:10:39PM -0400, David T wrote:
> Anyway - I would like these new functions to be permanently available
> to a database, or to all databases.  These functions will ultimately
> be called from PHP, where there is no guarantee of server state in
> between requests (maybe a reboot occurs and my functions are lost,
> etc...).  On the other hand, it is inefficient to "CREATE OR REPLACE"
> all the time.  Can anybody suggest a lightweight method to keep these
> functions permanently available, or point me towards a resource that
> might assist?

Once you have created a function in a database, it stays until you drop
it. No crash will lose it for example. You will have to do the creation
once for each database and if you create them in template1 they will
automatically appear whenever you create a new database.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

Вложения

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

Предыдущее
От: Chris Mayfield
Дата:
Сообщение: Merge Joins and Views
Следующее
От: "josep porres"
Дата:
Сообщение: PL/pgSQL Documentation, biblio, etc