Hi folks!

This question is slightly OT, since it is more about databases and DBI 
than AxKit, but I figured more people must have run into it.

When you code an exists or process sub in a Provider, that check against 
a database to see if the entry you're after exists, how do you do 
that...? 

I mean, this operation may be almost as expensive as retrieving the 
entry itself from the database, unless you do something smart...? 
So, if you first do an expensive operation to check if you process, and 
then do pretty much the same thing again to retrieve the resource, it 
seems like a waste... Right now, I've coded it to say "always exists" 
and then throw an exception after retrieving the resource, but that is 
clearly not the intended way. 

So, this smart thing I'm after, is there a cheap way to check if a row 
exists? I'm using the Perl DBI and a PostgreSQL database. 

Best,

Kjetil
-- 
Kjetil Kjernsmo
Astrophysicist/IT Consultant/Skeptic/Ski-orienteer/Orienteer/Mountaineer
[EMAIL PROTECTED]  [EMAIL PROTECTED]  [EMAIL PROTECTED]
Homepage: http://www.kjetil.kjernsmo.net/        OpenPGP KeyID: 6A6A0BBC


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to