bytea value is read incorrectly using protocol version 2
Posted: Mon 31 Oct 2011 14:16
Hi,
I am using dotConnect PostgreSQL version 5.50.228.0 against PostgreSQL 9.0.5 (on a Windows box).
I have several bytea fields that are not read correctly when using protocol=2 on the connection string. If I change to protocol=3 it seems to work.
On my machine I am able to set the bytea_output = 'escape' setting in postgresql.conf file to make it work using protocol=2, but this is not the case on another developer machine (running PostgreSQL 9.0.4). On this machine the bytea_output setting has no effect.
Both PostgreSQL versions are 32 bit.
I also have several PostgreSQL 9.0.3 instances running on Ubuntu and they have the same problem. Using protocol 2 gives problems reading the bytea fields using dotConnect driver.
I would like to be able to continue using protocol 2 AND avoid to modify the postgresql.conf to make it work. Also this does not even seem to work in all cases (as explained above).
So the questions are:
1) Is there a bug in the driver when using protocol 2 and having bytea_output = 'hex' in the config file? It should still be able to read the bytea value correct.
2) What are the fundamental differences between protocol 2 and 3? It seems like this is very difficult to get an answer for. I have only found this link: http://www.devart.com/dotconnect/univer ... irect.html and it does not explain this in details, other than saying that protocol 2 should be used if multiple queries in a single statement is needed.
Thanks,
Best regards,
Claus Thomsen
I am using dotConnect PostgreSQL version 5.50.228.0 against PostgreSQL 9.0.5 (on a Windows box).
I have several bytea fields that are not read correctly when using protocol=2 on the connection string. If I change to protocol=3 it seems to work.
On my machine I am able to set the bytea_output = 'escape' setting in postgresql.conf file to make it work using protocol=2, but this is not the case on another developer machine (running PostgreSQL 9.0.4). On this machine the bytea_output setting has no effect.
Both PostgreSQL versions are 32 bit.
I also have several PostgreSQL 9.0.3 instances running on Ubuntu and they have the same problem. Using protocol 2 gives problems reading the bytea fields using dotConnect driver.
I would like to be able to continue using protocol 2 AND avoid to modify the postgresql.conf to make it work. Also this does not even seem to work in all cases (as explained above).
So the questions are:
1) Is there a bug in the driver when using protocol 2 and having bytea_output = 'hex' in the config file? It should still be able to read the bytea value correct.
2) What are the fundamental differences between protocol 2 and 3? It seems like this is very difficult to get an answer for. I have only found this link: http://www.devart.com/dotconnect/univer ... irect.html and it does not explain this in details, other than saying that protocol 2 should be used if multiple queries in a single statement is needed.
Thanks,
Best regards,
Claus Thomsen