pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: [Pgjdbc-commit] By jurka: Add some more synchronization
2+ messages / 2 participants
[nested] [flat]
* Re: [Pgjdbc-commit] By jurka: Add some more synchronization
@ 2006-05-22 08:09 Kris Jurka <books@ejurka.com>
0 siblings, 1 reply; 2+ messages in thread
From: Kris Jurka @ 2006-05-22 08:09 UTC (permalink / raw)
To: Markus Schaber <schabi@logix-tt.com>; +Cc: pgsql-jdbc
On Mon, 22 May 2006, Markus Schaber wrote:
>> // pgname (String) -> java.sql.Types (Integer)
>> - private Map _pgNameToSQLType;
>> + private static final Map _pgNameToSQLType;
>
> Are you shure this should be static, and not per connection?
>
> AFAICS, it is possible to have two connections to different databases
> having different extension types installed, leading to conflicting maps.
>
This maps betweeen a pg type name like varchar and a java.sql.Types value
like Types.VARCHAR. There is a hardcoded list of pg types that the driver
knows about and can assign a Types value. For types the driver doesn't
know anything about, all it can say is that it is Types.OTHER. Note also
that in initialization it does:
_pgNameToSQLType = Collections.unmodifiableMap(pgNameToSQLType);
So there's no way it can get bad information into it.
Kris Jurka
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [Pgjdbc-commit] By jurka: Add some more synchronization
@ 2006-05-22 08:12 Markus Schaber <schabi@logix-tt.com>
parent: Kris Jurka <books@ejurka.com>
0 siblings, 0 replies; 2+ messages in thread
From: Markus Schaber @ 2006-05-22 08:12 UTC (permalink / raw)
To: pgsql-jdbc
Hi, Kris,
Kris Jurka wrote:
> This maps betweeen a pg type name like varchar and a java.sql.Types
> value like Types.VARCHAR. There is a hardcoded list of pg types that
> the driver knows about and can assign a Types value. For types the
> driver doesn't know anything about, all it can say is that it is
> Types.OTHER.
OK, I see.
I confused this with the typename -> OID map.
Sorry.
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2006-05-22 08:12 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-05-22 08:09 Re: [Pgjdbc-commit] By jurka: Add some more synchronization Kris Jurka <books@ejurka.com>
2006-05-22 08:12 ` Markus Schaber <schabi@logix-tt.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox