"OO" stored procedures?

Поиск
Список
Период
Сортировка
От Walker Aumann
Тема "OO" stored procedures?
Дата
Msg-id 7919.1021948007@fiduciaryasset.com
обсуждение исходный текст
Список pgsql-general
Hi all,

I'm about to start on my first serious SQL development project, and I'm
wondering about a feature that I can't find any information about.

Brief overview: we need a database to store lots of little bits of
information about various customer accounts.  Every month, some customers
want reports.  The problem is that the customers want different reports.
Ideally, I'd like to have a stored procedure associated with each
particular customer, so I can do something like (excuse the horrible mix
of SQL and perl here):

foreach $cust ('SELECT DISTINCT customers FROM accounts WHERE
    monthly_report IS NOT NULL')
{
    $cust.report($cust, $date);
}

Is this doable, or am I supposed to define a number of
customer1_monthly_report stored procedures in the global namespace and
use those?

Walker

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

Предыдущее
От: Dan Weston
Дата:
Сообщение: Added index ability for isbn-issn contrib example
Следующее
От: Steve Lane
Дата:
Сообщение: Re: MacOS X Shared Buffers (SHMMAX)?