You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Gary Gregory <ga...@gmail.com> on 2018/06/20 00:43:21 UTC

[DBCP] PStmtKey with SQL and catalog but not schema.

The PStmtKey class keys off of a SQL statement, catalog but not the schema.

Since a catalog is usually a collection of schema, shouldn't we use the
schema as part of this key?

(Java 7 added supported for getSchema() on a Connection.)

Gary

Re: [DBCP] PStmtKey with SQL and catalog but not schema.

Posted by Gary Gregory <ga...@gmail.com>.
On Wed, Jun 20, 2018 at 8:54 AM Gary Gregory <ga...@gmail.com> wrote:

> On Wed, Jun 20, 2018 at 6:04 AM Mark Thomas <ma...@apache.org> wrote:
>
>> On 20/06/18 01:43, Gary Gregory wrote:
>> > The PStmtKey class keys off of a SQL statement, catalog but not the
>> schema.
>> >
>> > Since a catalog is usually a collection of schema, shouldn't we use the
>> > schema as part of this key?
>>
>> If only the relationship was that simple. And consistent across vendors.
>>
>> There is a good summary here on SO:
>>
>> https://stackoverflow.com/questions/7942520/relationship-between-catalog-schema-user-and-database-instance
>>
>> > (Java 7 added supported for getSchema() on a Connection.)
>>
>> Assuming that the SO information is correct (I have no reason to think
>> otherwise apart from cynicism) then including the schema in the key
>> makes sense to me.
>>
>
> Tracking here: https://issues.apache.org/jira/browse/DBCP-508
>

This is done; in git master.

Gary


>
> Gary
>
>
>>
>> Mark
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>

Re: [DBCP] PStmtKey with SQL and catalog but not schema.

Posted by Gary Gregory <ga...@gmail.com>.
On Wed, Jun 20, 2018 at 6:04 AM Mark Thomas <ma...@apache.org> wrote:

> On 20/06/18 01:43, Gary Gregory wrote:
> > The PStmtKey class keys off of a SQL statement, catalog but not the
> schema.
> >
> > Since a catalog is usually a collection of schema, shouldn't we use the
> > schema as part of this key?
>
> If only the relationship was that simple. And consistent across vendors.
>
> There is a good summary here on SO:
>
> https://stackoverflow.com/questions/7942520/relationship-between-catalog-schema-user-and-database-instance
>
> > (Java 7 added supported for getSchema() on a Connection.)
>
> Assuming that the SO information is correct (I have no reason to think
> otherwise apart from cynicism) then including the schema in the key
> makes sense to me.
>

Tracking here: https://issues.apache.org/jira/browse/DBCP-508

Gary


>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Re: [DBCP] PStmtKey with SQL and catalog but not schema.

Posted by Mark Thomas <ma...@apache.org>.
On 20/06/18 01:43, Gary Gregory wrote:
> The PStmtKey class keys off of a SQL statement, catalog but not the schema.
> 
> Since a catalog is usually a collection of schema, shouldn't we use the
> schema as part of this key?

If only the relationship was that simple. And consistent across vendors.

There is a good summary here on SO:
https://stackoverflow.com/questions/7942520/relationship-between-catalog-schema-user-and-database-instance

> (Java 7 added supported for getSchema() on a Connection.)

Assuming that the SO information is correct (I have no reason to think
otherwise apart from cynicism) then including the schema in the key
makes sense to me.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org