"OO" stored procedures?

From: Walker Aumann <walkera-pgsql(at)ofb(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: "OO" stored procedures?
Date: 2002-05-21 02:26:47
Message-ID: 7919.1021948007@fiduciaryasset.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-05-21 03:09:23 Re: MacOS X Shared Buffers (SHMMAX)?
Previous Message Command Prompt, Inc. 2002-05-21 02:25:11 MacOS X Shared Buffers (SHMMAX)?