From: | Dave Cramer <pg(at)fastcrypt(dot)com> |
---|---|
To: | Jan Motl <yzan(at)volny(dot)cz>, List <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: getTypeInfo |
Date: | 2016-12-14 19:13:38 |
Message-ID: | CADK3HHKxtTCKttEDmUZME+pR+XDcnqhDT2ieJHsuti=3dUj-DA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
On 14 December 2016 at 14:04, Jan Motl <yzan(at)volny(dot)cz> wrote:
> Hi Dave,
>
> > Curious: Why do you care about the order ?
> The driver can return quite many data types because, beside other, it
> returns 2 tuples per relation in the database:
> https://www.postgresql.org/message-id/
> CADK3HHLK6V4JSfiGHLst2yQKO8rnKqObZefUaF0rDCqRASZpfw%40mail.gmail.com
> So I thought I could read rows from the resultSet while DATA_TYPES =< 93
> and ignore the rest (currently thousands of rows on my instance of
> PostgreSQL but in theory billions of rows are possible), since I am
> interested only in processing of DATA_TYPES =< 93. But if the order of the
> rows in the resultSet is not in ascending order of DATA_TYPE, I have to
> read all rows from the resultSet.
>
> I do not have a current need for correct ordering beyond DATA_TYPE
> resolution. But I can imagine that the correct ordering could be helpful if
> I wanted to write Java data types into a database the agnostic way (e.g. if
> I wanted to write down BIGINT, it could be helpful if the driver proposed
> to use int8 instead of oid and I did not have to hardcode the mapping for
> each database vendor (or use a library that would do that)).
>
> Beside of that, all official drivers for other databases that I tested
> (MySQL, Oracle, SAS) return the data types in the correct order.
>
> Fair enough
I've create an issue here: https://github.com/pgjdbc/pgjdbc/issues/716
Dave Cramer
davec(at)postgresintl(dot)com
www.postgresintl.com
From | Date | Subject | |
---|---|---|---|
Next Message | Jeremy Whiting | 2016-12-15 16:03:20 | Re: Re: logging bug in JDBC driver (https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar) |
Previous Message | Dave Cramer | 2016-12-14 16:30:23 | Re: getTypeInfo |