cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Enke Michael <Michael.E...@wincor-nixdorf.com>
Subject Re: esql.xsl and postgres datatypes
Date Wed, 03 Apr 2002 16:45:35 GMT
Christian Haul wrote:
> 
> On 03.Apr.2002 -- 12:34 PM, Enke Michael wrote:
> > Hi,
> > in postgres you have datatypes which are not in the sql standard
> > and you can define your own datatypes.
> > Two datatypes from postgres that I use often are bit() and bit varying().
> > If I call <esql:get-columns/> than the page crahses because the column type
> > for bit and bit varying is java.sql.Types.OTHER
> > Look at this snippet from esql:xsl:
> 
> >    case java.sql.Types.OTHER: // This is what Informix uses for Sets, Bags, Lists
> >       this._esql_printObject(_esql_query.getResultSet().getObject(_esql_i), xspAttr);
> >       break;
> 
> > We get the Exception because in the postgres driver there is no getObject for bit
or bit varying,
> 
> ?? jdbc specifies that _every_ type can be fetched by using getObject!
> (and every type can be set by using setObject) Well, LOBs are an
> exception to this rule.
> 
> You're absolutely sure it's the getObject method that causes the grief?

Yes I am. There are also (sparse) instructions in postgres manual how to create those classes.

 
> > but get-string-encoded for such columns is ok (you can of course define your own
extension classes).
> > I would propose to switch between different database systems in "case java.sql.Types.OTHER"
> >
> > Can anybody using Informix tell me what is the result of "connection.getMetaData().getURL();"?
> 
> The very URL that was used when connecting to the DB

;-) joker
I have no Informix and this is why I don't know the String.
I want to write
if(jdbcSource.startsWith("jdbc:postgresql:")) { ... }
else if(jdbcSource.startsWith("String for Informix")) { ... }

> 
> > Should we make "String jdbcSource;" public in EsqlConnection?
> 
> Would be a possibility.
> 
>         Chris.
> 
> --
> C h r i s t i a n       H a u l
> haul@informatik.tu-darmstadt.de
>     fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org


Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message