Hello Peter,

> the hex format ist default since 9.0
> Earlier versions use the octal format
> It can be changed by setting variable 'bytea_output'
> So I will try to figure out how to read octal as well :-)

That's great news! In the mean time, I have implemented #1323 on SVN
trunk and added your patch in a slightly modified version:
https://sourceforge.net/apps/trac/jooq/changeset/2161

Your logic is in the new class org.jooq.util.postgres.PostgresUtils.
There were some other Postgres-related UDT parsing issues that needed
to be fixed

Cheers
Lukas

2012/4/20 Peter Ertl <[email protected]>:
> I just read the postgresql doc again...
>
> the hex format ist default since 9.0
>
> Earlier versions use the octal format
>
> It can be changed by setting variable 'bytea_output'
>
> So I will try to figure out how to read octal as well :-)
>
> Am Donnerstag, 19. April 2012 08:17:43 UTC+2 schrieb Lukas Eder:
>>
>> Hello Peter,
>>
>> > I recently realized that jOOQ does not support byte[] inside a
>> > postgresql
>> > UDT.
>> >
>> > This was pretty sad since I tried to use this UDT:
>>
>> Yes, Postgres UDT support was written early in the jOOQ project.
>> byte[] support must have gone forgotten. Note that you may be breaking
>> new grounds with Postgres UDTs among jOOQ users. If you happen to find
>> a reliable solution how to return UDTs from stored functions, I'll
>> happily apply another patch! Some background information:
>>
>>
>> http://stackoverflow.com/questions/4652651/how-to-read-a-udt-from-a-postgres-stored-function
>>
>> Of course, the optimal solution would be for the Postgres JDBC driver
>> to correctly implement JDBC...
>>
>> > As I would love to see full support for UDT in postgresql I attached
>> > a patch
>> > which works for my current version 9.1. Would be cool to find it in jOOQ
>> > soon :-))
>>
>> Looks good to me at first sight. Thanks for this patch. This should
>> make it in jOOQ 2.3.0:
>> https://sourceforge.net/apps/trac/jooq/ticket/1323
>>
>> Can we be sure that binary literals are always streamed in the
>> hexadecimal encoding? As far as I know, the default in Postgres is
>> octal encoding:
>> http://www.postgresql.org/docs/9.1/static/datatype-binary.html
>>
>> Some additional insight can be seen here:
>>
>> http://stackoverflow.com/questions/9320200/inline-blob-binary-data-types-in-sql-jdbc
>>
>> Cheers
>> Lukas
>
>
> Am Donnerstag, 19. April 2012 08:17:43 UTC+2 schrieb Lukas Eder:
>>
>> Hello Peter,
>>
>> > I recently realized that jOOQ does not support byte[] inside a
>> > postgresql
>> > UDT.
>> >
>> > This was pretty sad since I tried to use this UDT:
>>
>> Yes, Postgres UDT support was written early in the jOOQ project.
>> byte[] support must have gone forgotten. Note that you may be breaking
>> new grounds with Postgres UDTs among jOOQ users. If you happen to find
>> a reliable solution how to return UDTs from stored functions, I'll
>> happily apply another patch! Some background information:
>>
>>
>> http://stackoverflow.com/questions/4652651/how-to-read-a-udt-from-a-postgres-stored-function
>>
>> Of course, the optimal solution would be for the Postgres JDBC driver
>> to correctly implement JDBC...
>>
>> > As I would love to see full support for UDT in postgresql I attached
>> > a patch
>> > which works for my current version 9.1. Would be cool to find it in jOOQ
>> > soon :-))
>>
>> Looks good to me at first sight. Thanks for this patch. This should
>> make it in jOOQ 2.3.0:
>> https://sourceforge.net/apps/trac/jooq/ticket/1323
>>
>> Can we be sure that binary literals are always streamed in the
>> hexadecimal encoding? As far as I know, the default in Postgres is
>> octal encoding:
>> http://www.postgresql.org/docs/9.1/static/datatype-binary.html
>>
>> Some additional insight can be seen here:
>>
>> http://stackoverflow.com/questions/9320200/inline-blob-binary-data-types-in-sql-jdbc
>>
>> Cheers
>> Lukas
>
>
> Am Donnerstag, 19. April 2012 08:17:43 UTC+2 schrieb Lukas Eder:
>>
>> Hello Peter,
>>
>> > I recently realized that jOOQ does not support byte[] inside a
>> > postgresql
>> > UDT.
>> >
>> > This was pretty sad since I tried to use this UDT:
>>
>> Yes, Postgres UDT support was written early in the jOOQ project.
>> byte[] support must have gone forgotten. Note that you may be breaking
>> new grounds with Postgres UDTs among jOOQ users. If you happen to find
>> a reliable solution how to return UDTs from stored functions, I'll
>> happily apply another patch! Some background information:
>>
>>
>> http://stackoverflow.com/questions/4652651/how-to-read-a-udt-from-a-postgres-stored-function
>>
>> Of course, the optimal solution would be for the Postgres JDBC driver
>> to correctly implement JDBC...
>>
>> > As I would love to see full support for UDT in postgresql I attached
>> > a patch
>> > which works for my current version 9.1. Would be cool to find it in jOOQ
>> > soon :-))
>>
>> Looks good to me at first sight. Thanks for this patch. This should
>> make it in jOOQ 2.3.0:
>> https://sourceforge.net/apps/trac/jooq/ticket/1323
>>
>> Can we be sure that binary literals are always streamed in the
>> hexadecimal encoding? As far as I know, the default in Postgres is
>> octal encoding:
>> http://www.postgresql.org/docs/9.1/static/datatype-binary.html
>>
>> Some additional insight can be seen here:
>>
>> http://stackoverflow.com/questions/9320200/inline-blob-binary-data-types-in-sql-jdbc
>>
>> Cheers
>> Lukas
>
>
> Am Donnerstag, 19. April 2012 08:17:43 UTC+2 schrieb Lukas Eder:
>>
>> Hello Peter,
>>
>> > I recently realized that jOOQ does not support byte[] inside a
>> > postgresql
>> > UDT.
>> >
>> > This was pretty sad since I tried to use this UDT:
>>
>> Yes, Postgres UDT support was written early in the jOOQ project.
>> byte[] support must have gone forgotten. Note that you may be breaking
>> new grounds with Postgres UDTs among jOOQ users. If you happen to find
>> a reliable solution how to return UDTs from stored functions, I'll
>> happily apply another patch! Some background information:
>>
>>
>> http://stackoverflow.com/questions/4652651/how-to-read-a-udt-from-a-postgres-stored-function
>>
>> Of course, the optimal solution would be for the Postgres JDBC driver
>> to correctly implement JDBC...
>>
>> > As I would love to see full support for UDT in postgresql I attached
>> > a patch
>> > which works for my current version 9.1. Would be cool to find it in jOOQ
>> > soon :-))
>>
>> Looks good to me at first sight. Thanks for this patch. This should
>> make it in jOOQ 2.3.0:
>> https://sourceforge.net/apps/trac/jooq/ticket/1323
>>
>> Can we be sure that binary literals are always streamed in the
>> hexadecimal encoding? As far as I know, the default in Postgres is
>> octal encoding:
>> http://www.postgresql.org/docs/9.1/static/datatype-binary.html
>>
>> Some additional insight can be seen here:
>>
>> http://stackoverflow.com/questions/9320200/inline-blob-binary-data-types-in-sql-jdbc
>>
>> Cheers
>> Lukas
>
>
> Am Donnerstag, 19. April 2012 08:17:43 UTC+2 schrieb Lukas Eder:
>>
>> Hello Peter,
>>
>> > I recently realized that jOOQ does not support byte[] inside a
>> > postgresql
>> > UDT.
>> >
>> > This was pretty sad since I tried to use this UDT:
>>
>> Yes, Postgres UDT support was written early in the jOOQ project.
>> byte[] support must have gone forgotten. Note that you may be breaking
>> new grounds with Postgres UDTs among jOOQ users. If you happen to find
>> a reliable solution how to return UDTs from stored functions, I'll
>> happily apply another patch! Some background information:
>>
>>
>> http://stackoverflow.com/questions/4652651/how-to-read-a-udt-from-a-postgres-stored-function
>>
>> Of course, the optimal solution would be for the Postgres JDBC driver
>> to correctly implement JDBC...
>>
>> > As I would love to see full support for UDT in postgresql I attached
>> > a patch
>> > which works for my current version 9.1. Would be cool to find it in jOOQ
>> > soon :-))
>>
>> Looks good to me at first sight. Thanks for this patch. This should
>> make it in jOOQ 2.3.0:
>> https://sourceforge.net/apps/trac/jooq/ticket/1323
>>
>> Can we be sure that binary literals are always streamed in the
>> hexadecimal encoding? As far as I know, the default in Postgres is
>> octal encoding:
>> http://www.postgresql.org/docs/9.1/static/datatype-binary.html
>>
>> Some additional insight can be seen here:
>>
>> http://stackoverflow.com/questions/9320200/inline-blob-binary-data-types-in-sql-jdbc
>>
>> Cheers
>> Lukas

Reply via email to