From: Steven M. Lotito <steven.lotito@302solutions.com>
To: pgsql-interfaces@postgresql.org
Subject: Accessing Large Objects From Cold Fusion
Date: Fri, 25 Apr 2003 11:02:14 -0400
Message-ID: <HHEJILPAMPBDOKLANGCHMEOCCDAA.steven.lotito@302solutions.com> (raw)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi, I've run into an issue that I hope someone can help with... I have a
3rd
party postgres database that I need to use ColdFusion to access. They are
XML
documents, but show up as OIDs. I cannot figure out how to get ColdFusion
to
read the actual data object... if I select the field I just get the numeric
OID... (I guess it's roughly equivalent to a BLOB)
\d shows:
Table "planinstances"
Attribute | Type | Modifier
- ---------------------------------------------------
planinst_id | integer | not null default
nextval('"planinstances_planinst_id_seq"'::text)
parent_id | integer | default 0
entdate | timestamp with time zone | default
"timestamp"('now'::text)
plandef_id | integer |
state | character varying(32) | default 'unknown'
status | character varying(32) | default 'pending'
preprov_config | oid | default 0
preprov_result | oid | default 0
activation_config | oid | default 0
activation_result | oid | default 0
ispoverview | oid | default 0
servinst_id | integer | default 0
user_id | integer | default 0
order_id | integer | default 0
Indices:
index_planinstance_order_id,index_planinstance_plandef_id,index_planinstance
_sta
te,index_planinstance_svcins_id,index_planinstance_user_id,planinstances_pke
y
The CF query is:
<CFQUERY NAME="q" DATASOURCE="PostgresDB">
SELECT activation_config, plandef_id, planinst_id,
preprov_config
FROM planinstances
WHERE user_id = '#ARGUMENTS.user_id#'
AND status = 'normal'
AND state='active'
AND parent_id = 0
</CFQUERY>
I'm using ColdFusion MX with the latest postgres JDBC driver...
I've been able to access these fields in the past ( in Perl I could use
lo_read() and could do it in Java using the ResultSet.getBinaryStream()
method
) but I need to figure out how to do this with ColdFusion...
Does anyone have any suggestions? Thanks in advance!
steve
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com;
iQA/AwUBPqlN9eirKAzVk3unEQKO+QCg8daYQ3M6JbTy5OyqrZ26ET5LOKQAn19f
C135duxdBKu8X5YT57L3zESE
=92fZ
-----END PGP SIGNATURE-----
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 using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: steven.lotito@302solutions.com
Subject: Re: Accessing Large Objects From Cold Fusion
In-Reply-To: <HHEJILPAMPBDOKLANGCHMEOCCDAA.steven.lotito@302solutions.com>
* 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