Re: Patch for Statement.getGeneratedKeys() - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: Patch for Statement.getGeneratedKeys()
Date
Msg-id 23430.1200495718@sss.pgh.pa.us
Whole thread Raw
In response to Re: Patch for Statement.getGeneratedKeys()  (Ken Johanson <pg-user@kensystem.com>)
List pgsql-jdbc
Ken Johanson <pg-user@kensystem.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

pgsql-jdbc by date:

Previous
From: "Albretch Mueller"
Date:
Subject: trying to connect to pg from within a local network
Next
From: "Albe Laurenz"
Date:
Subject: Re: trying to connect to pg from within a local network