Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-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

pgsql-jdbc by date

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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group