From: | Kris Jurka <books(at)ejurka(dot)com> |
---|---|
To: | Anton Nikiforov <anton(at)nikiforov(dot)ru> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Newbie question |
Date: | 2004-09-24 22:42:16 |
Message-ID: | Pine.BSO.4.56.0409241737040.27314@leary.csoft.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
On Sat, 25 Sep 2004, Anton Nikiforov wrote:
> Getting started with the JDBC programming i have some troubles:
> 1. Is there a kinda of solution to operate CIDR and other pgsql-specific
> value types with PGSQL+Java (i know, that i can use ::text to get and
> ::cidr to set, but maybe there are some classes that extend Type class
> that i did not find in the documentation)?
There are some java types that match postgresql specific types, but these
are mainly for geometric data types. For now you need to just use get and
setString for these types. Useful implementations for these types would
be accepted.
> 2. I found almost everything what i can get from Result/Database
> metadata, but found no way to know the table name that that was
> indicated in sql statemen during getting data.
Currently undocumented and only in the development version of the driver
there are methods PGResultSetMetaData.getBaseXXXName where XXX can be
Column, Table, or Schema. This retieves the underlying table information
from a query result.
> 3. Is there any way to know that data in the database was changed
> (three-level application could do the trick, but i'm asking about simple
> way - JTable->JSorter->JModel->postgresql without using RMI or whatever)
You could use LISTEN/NOTIFY to create a solution to this, but there's no
standard or automatic way to make this happen. Things like
ResultSet.rowUpdated() are not implemented.
Kris Jurka
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Moses | 2004-09-25 10:20:54 | Arrays Question? -Simon Moses |
Previous Message | Anton Nikiforov | 2004-09-24 22:30:23 | Newbie question |