pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How to get sequence info?
2+ messages / 2 participants
[nested] [flat]

* How to get sequence info?
@ 2007-05-04 17:05  Gary Greenberg <gary@icontrol.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Gary Greenberg @ 2007-05-04 17:05 UTC (permalink / raw)
  To: pgsql-jdbc

I need to find out what sequences were created in the database.

Does anyone know how to do it? 

I can get info on tables, keys, columns from DatabaseMetadata, but I don't
see any means to retrieve sequence info.

If you know how, please give me a tip.

Regards,

            Gary

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

* Re: How to get sequence info?
@ 2007-05-04 17:18  Kris Jurka <books@ejurka.com>
  parent: Gary Greenberg <gary@icontrol.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Kris Jurka @ 2007-05-04 17:18 UTC (permalink / raw)
  To: Gary Greenberg <gary@icontrol.com>; +Cc: pgsql-jdbc



On Fri, 4 May 2007, Gary Greenberg wrote:

> I need to find out what sequences were created in the database.
>
> Does anyone know how to do it?

Sequences are returned as tables with a TABLE_TYPE of SEQUENCE, so you can 
say:

DatabaseMetaData.getTables("%","%","%", new String[]{"SEQUENCE"});

Kris Jurka




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


end of thread, other threads:[~2007-05-04 17:18 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-05-04 17:05 How to get sequence info? Gary Greenberg <gary@icontrol.com>
2007-05-04 17:18 ` Kris Jurka <books@ejurka.com>

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