Re: Patch for Statement.getGeneratedKeys()

From: Ken Johanson <pg-user(at)kensystem(dot)com>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Patch for Statement.getGeneratedKeys()
Date: 2008-01-15 05:31:02
Message-ID: 478C4516.1000804@kensystem.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general 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?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ken Johanson 2008-01-15 05:38:30 Re: Patch for Statement.getGeneratedKeys()
Previous Message Adam Rich 2008-01-15 05:03:05 Re: Locking & concurrency - best practices

Browse pgsql-jdbc by date

  From Date Subject
Next Message Ken Johanson 2008-01-15 05:38:30 Re: Patch for Statement.getGeneratedKeys()
Previous Message Kris Jurka 2008-01-15 03:30:39 Re: setQueryTimeout