Re: Patch for Statement.getGeneratedKeys()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ken Johanson <pg-user(at)kensystem(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Patch for Statement.getGeneratedKeys()
Date: 2008-01-16 15:01:58
Message-ID: 23430.1200495718@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-jdbc

Ken Johanson <pg-user(at)kensystem(dot)com> writes:
> Here is what I have so far (not sure of my conditionals yet or if I need
> any joins for them):

> select attname from pg_attribute
> where attrelid = 'postgres.public.test'::regclass
> and attstattarget=-1
> and attisdropped='f'
> order by attnum asc

I'd do "where attrelid = ... and attnum > 0 and not attisdropped".
Not sure what you think the attstattarget condition would accompllish,
but it doesn't seem like anything that client-side code ought to be
touching.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message beer@cmu.edu 2008-01-16 15:02:23 Building 8.1.11 on FC4
Previous Message Josh Harrison 2008-01-16 14:56:08 Re: Online Oracle to Postgresql data migration

Browse pgsql-jdbc by date

  From Date Subject
Next Message Albe Laurenz 2008-01-16 16:00:38 Re: trying to connect to pg from within a local network
Previous Message Albretch Mueller 2008-01-16 14:22:19 trying to connect to pg from within a local network