Thread: Storing Perl objects
I understand that PostgreSQL has OO capabilities. Is it possible to store full-blown Perl objects in a PostgreSQL table? (I suppose that one can always serialize Perl objects and store the serialized text, but this is hardly OO.) Thanks, kynn
Hi, maybe SPOPS will work, which is an acronym for Simple Perl Object Persistence with Security which wraps calls like 'fetch' and 'store', and the real code lies in your subclassing SPOPS implementing DBI specific methodsfor the Postgres DBI (i'd imagine). There are a few other modules on CPAN which you would probably also inherit fromand override methods to get them to work. Unfortunately, I don't know what OO capabilities PostgreSQL has on its own. I suppose that's what you're asking, though. On Sun, Feb 08, 2004 at 12:07:30PM -0500, kynn@panix.com wrote: > > > > I understand that PostgreSQL has OO capabilities. Is it possible to > store full-blown Perl objects in a PostgreSQL table? (I suppose that > one can always serialize Perl objects and store the serialized text, > but this is hardly OO.) > > Thanks, > > kynn > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org -- joe speigle
Kynn, > I understand that PostgreSQL has OO capabilities. Nope! Bzzzzzzzz. Thank you for playing. ;-) We are Object-Relational, not Object Oriented. Object-Relational has to do with our custom data types, operators, aggregates, and table inheritance. It is not OO, or even really analogous. > Is it possible to > store full-blown Perl objects in a PostgreSQL table? (I suppose that > one can always serialize Perl objects and store the serialized text, > but this is hardly OO.) I suggest using Alzabo. Look it up on Freshmeat. -- Josh Berkus Aglio Database Solutions San Francisco
SPOPS, too On Sun, Feb 08, 2004 at 09:36:45PM -0800, Josh Berkus wrote: > Kynn, > > > I understand that PostgreSQL has OO capabilities. > > Nope! Bzzzzzzzz. Thank you for playing. ;-) > > We are Object-Relational, not Object Oriented. Object-Relational has to do > with our custom data types, operators, aggregates, and table inheritance. It > is not OO, or even really analogous. > > > Is it possible to > > store full-blown Perl objects in a PostgreSQL table? (I suppose that > > one can always serialize Perl objects and store the serialized text, > > but this is hardly OO.) > > I suggest using Alzabo. Look it up on Freshmeat. > > -- > Josh Berkus > Aglio Database Solutions > San Francisco > > ---------------------------(end of broadcast)--------------------------- > TIP 9: the planner will ignore your desire to choose an index scan if your > joining column's datatypes do not match -- joe speigle www.sirfsup.com