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

From Ken Johanson
Subject Re: Patch for Statement.getGeneratedKeys()
Date
Msg-id 478C4516.1000804@kensystem.com
Whole thread Raw
In response to Re: Patch for Statement.getGeneratedKeys()  (Kris Jurka <books@ejurka.com>)
Responses Re: Patch for Statement.getGeneratedKeys()
List pgsql-jdbc
>> is it is possible to determine the connection's db and schema
>> names to normalize those array elements (in the case where just the
>> [schema]tablename is provided). Is it possible without a round trip to
>> know what these should be?
>
> You can tell the connection's database via Connection.getCatalog, but
> there is no such thing as a connection's schema.  Each connection has a
> search_path that specifies the order it looks through schemas to find a
> table.  So you can't tell what schema a table is in without looking
> through the list.
>

That makes sense to me now, thanks. In any case do you agree that we
still need to parse the fully qualified table, in case of input like:

insert into postgres.public.test ...

I don think my earlier question about getting the current/default
catalog name is relevant since the query can specify other ones. True?



pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: setQueryTimeout
Next
From: Ken Johanson
Date:
Subject: Re: Patch for Statement.getGeneratedKeys()