Re: Patch for Statement.getGeneratedKeys()
От | Ken Johanson |
---|---|
Тема | Re: Patch for Statement.getGeneratedKeys() |
Дата | |
Msg-id | 478DBC5D.30607@kensystem.com обсуждение исходный текст |
Ответ на | Re: Patch for Statement.getGeneratedKeys() (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Patch for Statement.getGeneratedKeys()
|
Список | pgsql-jdbc |
Tom Lane wrote: > Right. I suggest using regclass to obtain the OID of the referenced > table, which then allows direct lookup in pg_attribute and other > relevant catalogs. Something along the line of > > select attname from pg_attribute where attrelid = 't'::regclass > 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 Very simple and elegant, you guys rule. Couple things I want to verify - will this regclass method have any cases where security would make it less reliable than say, using pg_*? Also compatibility issues?: are there any server or session/driver modes that would somehow prevent this from working? ken
В списке pgsql-jdbc по дате отправления: