Page 1 of 1

protocol differencies

Posted: 01.12.2013, 00:08
by zarkadenes
Hi,
What is the difference between protocol:postgresql-8 and postgresql-9?

Re: protocol differencies

Posted: 01.12.2013, 21:55
by EgonHugeist
The Name? Actually there are NO behavior changes. Just a hint "we support PG9+".

Re: protocol differencies

Posted: 03.12.2013, 10:28
by Wild_Pointer
Hello,
EgonHugeist wrote:The Name? Actually there are NO behavior changes. Just a hint "we support PG9+".
Are you sure? For some unknown reason we get range check errors on some computers when using postgresql-8 and they are gone if we use postgres-9... I was unable to reproduce it on my computer, but the problem is reported by some of our clients...

Re: protocol differencies

Posted: 03.12.2013, 16:29
by EgonHugeist
@Wild_Pointer

I am. I did not more than adding a clone of generic PostgresPlainDriver with the postgres-9 name.

Code: Select all

constructor TZPostgreSQLDriver.Create;
begin
  inherited Create;
  AddSupportedProtocol(AddPlainDriverToCache(TZPostgreSQL9PlainDriver.Create, 'postgresql'));
  AddSupportedProtocol(AddPlainDriverToCache(TZPostgreSQL7PlainDriver.Create));
  AddSupportedProtocol(AddPlainDriverToCache(TZPostgreSQL8PlainDriver.Create));
  AddSupportedProtocol(AddPlainDriverToCache(TZPostgreSQL9PlainDriver.Create));
end;
and:

Code: Select all

TZPostgreSQL9PlainDriver = class(TZPostgreSQL8PlainDriver)
the only overrides they are differing differ are Name etc. But nothing related. Actually im playing with field types on 7.2. Some behavior changes are to expact just to avoid such cases...
For some unknown reason we get range check errors on some computers when using postgresql-8 and they are gone if we use postgres-9... I was unable to reproduce it on my computer, but the problem is reported by some of our clients...
Uff i trust you. It might be possible this only was fixed becouse of forward developing of Zeos? There are things which do NOT make me happy with postgre:
Decimal and Numeric-Types do NOT have a limitation. Updateing them as string might work because postgres only stores #0 terminated strings (the performance drop against other providers) and reading back could lead to pain. If you can't track origin and there is NO sample .... I can't help.