Received: from smtp.shellnet.co.uk (smtp.shellnet.co.uk [194.129.209.14]) by hub.org (8.9.3/8.9.3) with ESMTP id GAA09435 for ; Fri, 9 Jul 1999 06:57:20 -0400 (EDT) (envelope-from johnridout@ctasystems.co.uk) Received: from johnridout (station.ttg.co.uk [194.159.177.252] (may be forged)) by smtp.shellnet.co.uk (8.9.3/8.9.1-shellnet.stevenf) with SMTP id LAA04980; Fri, 9 Jul 1999 11:57:17 +0100 (BST) Posted-Date: Fri, 9 Jul 1999 11:57:17 +0100 (BST) From: "John Ridout" To: "'pgsql'" Cc: "'Ansley, Michael'" Subject: RE: [SQL] Good Optimization Date: Fri, 9 Jul 1999 11:56:23 +0100 Message-ID: <000501bec9f9$b09be900$0301010a@johnridout> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 In-Reply-To: <1BF7C7482189D211B03F00805F8527F70ED013@S-NATH-EXCH2> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Importance: Normal Hi, I'm developing on PostgreSQL. The lack of stored procedures which return a rowset is a major disadvantage for PostgreSQL. Completely aside from the performance issue are application security and the architecture of the information system. I'll give an example so I'm what I'm talking about. :-) Based on the database user's identity I chose which rowset to return. We can't allow someone to peek at someone else's data. (They may be a few more steps before I decide which rowset to return.) The alternatives are not pretty. 1. Allow the client to chose which rowset is returned. This is means no security so its not really an option. 2. Create a database function which given the primary key of a table returns true or false for whether the current user may return this row. Use this function in a view. Massively inefficient. 3. Adopt a 3-tier architecture for all parts of the system. Right down to the most trivial data entry and reporting. So now we have an unnecessarily complex system. I.e. it will take longer, cost more and have more bugs. Of course they won't be my bugs. ;-) I have a small question where do I get started hacking PostgreSQL? I'll have plenty of time to get started round about September. In the meantime what homework do you suggest? Clustering!? Can we have a transaction log first? Regards John Ridout. P.S. Send me your tips for programming PostgreSQL. So far I have received hints and tips for Query optimization. Passing more than 8 arguments to a function.