pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John Ridout <johnridout@ctasystems.co.uk>
To: 'pgsql' <pgsql-sql@postgresql.org>
Cc: 'Ansley, Michael' <Michael.Ansley@intec.co.za>
Subject: RE: [SQL] Good Optimization
Date: Fri, 9 Jul 1999 11:56:23 +0100
Message-ID: <000501bec9f9$b09be900$0301010a@johnridout> (raw)
In-Reply-To: <1BF7C7482189D211B03F00805F8527F70ED013@S-NATH-EXCH2>

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.




view thread (27+ messages)  latest in thread

Message-ID: <000501bec9f9$b09be900$0301010a@johnridout>
Permalink:  ../000501bec9f9$b09be900$0301010a@johnridout/
Also on:    postgresql.org/message-id/000501bec9f9$b09be900$0301010a@johnridout

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: johnridout@ctasystems.co.uk, Michael.Ansley@intec.co.za
  Subject: Re: [SQL] Good Optimization
  In-Reply-To: <000501bec9f9$b09be900$0301010a@johnridout>
  References: <1BF7C7482189D211B03F00805F8527F70ED013@S-NATH-EXCH2> <000501bec9f9$b09be900$0301010a@johnridout>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox