pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
table and column's comments
5+ messages / 3 participants
[nested] [flat]

* table and column's comments
@ 2004-10-06 21:47 Katalina Marcos <kmarcos@mazda.com.co>
  2004-10-06 22:11 ` Re: table and column's comments Oliver Jowett <oliver@opencloud.com>
  2004-10-07 04:51 ` Re: table and column's comments Kris Jurka <books@ejurka.com>
  0 siblings, 2 replies; 5+ messages in thread

From: Katalina Marcos @ 2004-10-06 21:47 UTC (permalink / raw)
  To: pgsql-jdbc

Hi all!

 

I want to ask you if I can retrieve table's comment and column's comments
whit ResultSetMetaData in pgjdbc.

 

I did prove with a simple query ("select * from ca_t_nivel where 1=0") but
table name is empty and column label is the same column name. I did use
pg74.213.jdbc3.jar, my output:

 

table name 

column number: 1

column name: tpl_nivel_conshist

column label: tpl_nivel_conshist

column type: 4

column classname: java.lang.Integer

column display size: 11

column number: 2

column name: td_nivel_fechoper

column label: td_nivel_fechoper

column type: 93

column classname: java.sql.Timestamp

column display size: 22

 

I've searched in mail list but I didn't found much about it.

 

Thanks in advance.

Kata

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: table and column's comments
  2004-10-06 21:47 table and column's comments Katalina Marcos <kmarcos@mazda.com.co>
@ 2004-10-06 22:11 ` Oliver Jowett <oliver@opencloud.com>
  2004-10-06 22:17   ` Re: table and column's comments Katalina Marcos <kmarcos@mazda.com.co>
  1 sibling, 1 reply; 5+ messages in thread

From: Oliver Jowett @ 2004-10-06 22:11 UTC (permalink / raw)
  To: kmarcos@mazda.com.co; +Cc: pgsql-jdbc

Katalina Marcos wrote:

> I want to ask you if I can retrieve table’s comment and column’s 
> comments whit ResultSetMetaData in pgjdbc.

You can't get at the comments via the standard interface; it has no 
provision for them. The label fields are apparently intended for output 
formatting, not for comment display. See the discussion at:

   http://archives.postgresql.org/pgsql-jdbc/2004-07/msg00314.php
   http://archives.postgresql.org/pgsql-jdbc/2004-08/msg00008.php

If you need to get at the comments, you'll need to do a 
postgresql-specific query.

-O



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: table and column's comments
  2004-10-06 21:47 table and column's comments Katalina Marcos <kmarcos@mazda.com.co>
  2004-10-06 22:11 ` Re: table and column's comments Oliver Jowett <oliver@opencloud.com>
@ 2004-10-06 22:17   ` Katalina Marcos <kmarcos@mazda.com.co>
  0 siblings, 0 replies; 5+ messages in thread

From: Katalina Marcos @ 2004-10-06 22:17 UTC (permalink / raw)
  To: 'Oliver Jowett' <oliver@opencloud.com>; +Cc: pgsql-jdbc

Ok...

Thanks for your replay
Kata

-----Mensaje original-----
De: Oliver Jowett [mailto:oliver@opencloud.com] 
Enviado el: miércoles, 06 de octubre de 2004 17:11
Para: kmarcos@mazda.com.co
CC: pgsql-jdbc@postgresql.org
Asunto: Re: [JDBC] table and column's comments

Katalina Marcos wrote:

> I want to ask you if I can retrieve table’s comment and column’s 
> comments whit ResultSetMetaData in pgjdbc.

You can't get at the comments via the standard interface; it has no 
provision for them. The label fields are apparently intended for output 
formatting, not for comment display. See the discussion at:

   http://archives.postgresql.org/pgsql-jdbc/2004-07/msg00314.php
   http://archives.postgresql.org/pgsql-jdbc/2004-08/msg00008.php

If you need to get at the comments, you'll need to do a 
postgresql-specific query.

-O




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: table and column's comments
  2004-10-06 21:47 table and column's comments Katalina Marcos <kmarcos@mazda.com.co>
@ 2004-10-07 04:51 ` Kris Jurka <books@ejurka.com>
  2004-10-07 13:40   ` Re: table and column's comments Katalina Marcos <kmarcos@mazda.com.co>
  1 sibling, 1 reply; 5+ messages in thread

From: Kris Jurka @ 2004-10-07 04:51 UTC (permalink / raw)
  To: Katalina Marcos <kmarcos@mazda.com.co>; +Cc: pgsql-jdbc



On Wed, 6 Oct 2004, Katalina Marcos wrote:

> I want to ask you if I can retrieve table's comment and column's comments
> whit ResultSetMetaData in pgjdbc.

Not with ResultSetMetaData, but with DatabaseMetaData you can.  
Both getTables and getColumns have REMARKS columns.

Kris Jurka



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: table and column's comments
  2004-10-06 21:47 table and column's comments Katalina Marcos <kmarcos@mazda.com.co>
  2004-10-07 04:51 ` Re: table and column's comments Kris Jurka <books@ejurka.com>
@ 2004-10-07 13:40   ` Katalina Marcos <kmarcos@mazda.com.co>
  0 siblings, 0 replies; 5+ messages in thread

From: Katalina Marcos @ 2004-10-07 13:40 UTC (permalink / raw)
  To: 'Kris Jurka' <books@ejurka.com>; +Cc: pgsql-jdbc

Thanks a lot!
Kata

-----Mensaje original-----
De: Kris Jurka [mailto:books@ejurka.com] 
Enviado el: miércoles, 06 de octubre de 2004 23:51
Para: Katalina Marcos
CC: pgsql-jdbc@postgresql.org
Asunto: Re: [JDBC] table and column's comments



On Wed, 6 Oct 2004, Katalina Marcos wrote:

> I want to ask you if I can retrieve table's comment and column's comments
> whit ResultSetMetaData in pgjdbc.

Not with ResultSetMetaData, but with DatabaseMetaData you can.  
Both getTables and getColumns have REMARKS columns.

Kris Jurka




^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2004-10-07 13:40 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-10-06 21:47 table and column's comments Katalina Marcos <kmarcos@mazda.com.co>
2004-10-06 22:11 ` Oliver Jowett <oliver@opencloud.com>
2004-10-06 22:17   ` Katalina Marcos <kmarcos@mazda.com.co>
2004-10-07 04:51 ` Kris Jurka <books@ejurka.com>
2004-10-07 13:40   ` Katalina Marcos <kmarcos@mazda.com.co>

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