[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GDL2, postgres adaptor issues.
From: |
Simon Stapleton |
Subject: |
GDL2, postgres adaptor issues. |
Date: |
Thu, 6 May 2004 16:07:55 +0200 |
Hi again.
OK, I've been playing with some fairly heavy duty postgres usage under
GDL2, and I've hit a problem or two. Fixable, though.
First off, EOKeyValueCoding seems to be broken, around the
performXXXforKey: handling. The problem shows itself when you try to
use eogenerator to build source files.
Here's my patch to make it work. It's not too clean, but it doesn't
seem to have broken anything else, and I needed this to be working in
order to get any further. My apologies for the quality of the code.
kvc.diff
Description: Binary data
Next up, data types expect bpchar as their external type. This causes
me a problem, as I was needing bytea, which would seem to me to be the
most logical choice anyway. I have a hacky fix (again), but I propose
a better solution, as follows:
Postgres95Channel should check for binary types and use
PQunescapeBytea() to unescape the data before creating the attributes
(round about line 400, in -fetchRowWithZone:), and should use
PQescapeBytea() in -insertRow:ForEntity: and
updateValues:inRowDescribedByQualifier:entity: whenever we're writing
out bytea data.
An added bonus to this is that we could avoid the large object
interface entirely (although that might be needed when people are
adding really large objects to tables)
Here's my hacky fix which seems to work so far (although, it has to be
said, I haven't been thrashing it yet)
pg.diff
Description: Binary data
thoughts?
Simon
--
AppleCare. Now _there's_ an oxymoron for you.
--
PGP Key Id : 0x50D0698D
- GDL2, postgres adaptor issues.,
Simon Stapleton <=