Skip site navigation (1) Skip section navigation (2)

Re: PGResultSetMetaData

From: "Chris Smith" <cdsmith(at)twu(dot)net>
To: "leo" <usenet(at)workfile(dot)de>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: PGResultSetMetaData
Date: 2005-01-23 19:32:30
Message-ID: 01c701c50182$47c05350$7500000a@KALIO (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
leo wrote:
> as I need getTableName() and getSchemaName() I found
> the interface PGResultSetMetaData.
> Is ist still experimental?
> Has anybody used it already? If so, could you give me
> a hint how to implement it?

It's not experimental.  However, instead of using the PostgreSQL 
implementation class, you should stick to the JDBC API.

    ResultSet rs = stmt.executeQuery(...);
    ResultSetMetaData rmd = rs.getMetaData();

    String table = rmd.getTableName(1);
    String schema = rmd.getSchemaName(1);

(just for example)

The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation 

In response to


pgsql-jdbc by date

Next:From: leoDate: 2005-01-23 19:49:59
Subject: Re: PGResultSetMetaData
Previous:From: leoDate: 2005-01-23 19:14:30
Subject: PGResultSetMetaData

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group