how do i get jdbc to recognize the ltree type that comes with the
contrib/ltree extension?
This:
Object object = resultSet.getObject(columnNumber);
generates the following exception:
Exception caused by: No class found for ltree
at
org.postgresql.jdbc1.AbstractJdbc1Connection.getOb
can anyone recommend a good reference source for doing recursive sql on
postgresql? i want to do something similar to a BOM expansion. (i.e. i need
to traverse a self-referencing table that stores a tree structure and answer
a question like "Get me A and all of A's descendents")
Regards,
Floyd S
is there any way to use a composite type in a table?
here's an example:
say i want to create a type to hold currency:
create type currency_type as ( base_objid int, base_amt decimal,
conversion_rate decimal, converted_objid int );
i'd like to be able to define a column in a table of type curr
when i copy/paste the select stmt into psql, it works. or if i use it
"dynamically". it doesn't work properly when i use it in a prepared
statement -- which is what i am doing.
Regards,
Floyd Shackelford
4 Peaks Technology Group, Inc.
VOICE: 334.735.9428
FAX: 702.995.6462
EMAIL: [EMAIL PROTEC
i was wrong. it doesn't work as a prepared statement nor as a dynamic string
using jdbc.
it works fine if i paste it into psql.
is it possible that a problem with a calculated column and a subselect in
conjunction is a jdbc bug?
Regards,
Floyd Shackelford
4 Peaks Technology Group, Inc.
VOICE:
this must be a problem with my sql, but this one has me stumped. the column:
Debit."cumm_dbt_blnce" - Credit."cumm_crd_blnce" in the long sql statement
below comes out as the literal: Debit."cumm_dbt_blnce" -
Credit."cumm_crd_blnce" rather than as the calculated value. WHY!?!?!
this works with s
using: psql (PostgreSQL) 7.2.1
why does an empty array return an array of length 1 rather than array of
length 0? one would think that the results below would have returned { }
instead of {0}.
simple test using psql:
# create table test_table ( test_column integer[] );
CREATE
# insert into test
seems like an error in the sql parser to me:
# create table test (acol smallint[]);
CREATE
# insert into test (acol) values ('{ 0 }');
ERROR: pg_atoi: error in "0 ": can't parse " "
# insert into test (acol) values ('{ 0}');
INSERT 28472 1
the only difference is the trailing " " after the 0;