LWN.net Logo

PostgreSQL Weekly News

PostgreSQL Weekly News

Posted Apr 28, 2003 12:28 UTC (Mon) by Peter (guest, #1127)
In reply to: PostgreSQL Weekly News by haraldt
Parent article: PostgreSQL Weekly News

PostgreSQL has oids, it has inheritance.. Making a function work as part of a table shouldn't be that hard, all compared?

It sounds like you just invented views. And stored procedures. And triggers.

To have table output mix real data rows and rows generated from functions has it's uses anyway.

That still sounds like views and stored procedures.

Ah well, I'm not a DBMS guy. Assuming for the moment that "OO" databases are anything more than a shift in terminology, I probably wouldn't understand the advantages anyway. I'm so behind the times, my Java friends are still having trouble convincing me that exceptions are a worthwhile substitute for actual error handling.


(Log in to post comments)

PostgreSQL Weekly News

Posted Apr 28, 2003 16:16 UTC (Mon) by haraldt (guest, #961) [Link]

There isn't much invention. That's exactly the point.

OO isn't more than a shift in terminology. Plus some important implications and some new functions related to that.

OO is moving functionality inside the datasets, so the functions can work with a more limited dataset called "its own".
So, instead of having a function look up and handle the data indexed by a reference number 101, you can ask a function inside a data collection number 101 to handle its own data and spit results back to you.
You can of course add a lot of advanced gingmaloose to that, but it still doesn't stop you from making things simple.

So, I didn't mean more than make something unified out of a join between a data table and a number of view/function/whatever. And define a smart&simple way for the function to reference the data row currently being handled.

If that's in place, you may find a way for a function to store data into the table row being referenced. Or even let a function create a brand new row and put data into it.
And have these functions follow the same rules of inheritance as in the tables. As they do belong with the table definition.

Then, you can begin to worry about isolating/protecting the data entries so functions not defined to belong to that particular table row can't mess with it.

PostgreSQL Weekly News

Posted Aug 7, 2003 21:06 UTC (Thu) by leandro (subscriber, #1460) [Link]

> OO isn't more than a shift in terminology.

Would it wasn't... actually OO in databases is going back 30 years to graph databases, like CODASYL, IDMS and IMS: the so-called network and hierarchical horrors.

Even if it was, shifting terminology is evil, as it confuses even a situation that was already confused by SQL's crap terminology. Give me relationalspeak, please.

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds