Search found 118 matches

by olehs
05.09.2012, 12:40
Forum: ZeosLib 7.0 Beta Forum
Topic: Full Unicode/Ansi-Support in /testing branch
Replies: 653
Views: 82177

miab3,

What do you specify in Catalog and Database properties?
by olehs
05.09.2012, 12:27
Forum: ZeosLib 7.0 Beta Forum
Topic: Full Unicode/Ansi-Support in /testing branch
Replies: 653
Views: 82177

miab3,

does the same issue exist with TZTable component?
by olehs
05.09.2012, 07:37
Forum: ZeosLib 7.0 Beta Forum
Topic: Full Unicode/Ansi-Support in /testing branch
Replies: 653
Views: 82177

EgonHugeist,
can you point me to bugreports where loosing of precision in Doubles is described?

As far as I know passing Doubles as strings gives a precision of 15, which is the real precision for this datatype.

The only profit of using binary format is in Bcd data. Did you mean TBCDFields?
by olehs
04.09.2012, 21:43
Forum: ZeosLib 7.0 Beta Forum
Topic: Full Unicode/Ansi-Support in /testing branch
Replies: 653
Views: 82177

But why do the LAzarus tests crash now? Since activating this statment? Didn't run them since two weeks. No, I don't think so. I'll try to make a clean build of everything (Freepascal, Lazarus and Zeoslib) to make sure it's not problem on my side. Oleg is it possible to use PDouble pointers instead...
by olehs
04.09.2012, 20:38
Forum: ZeosLib 7.0 Beta Forum
Topic: Full Unicode/Ansi-Support in /testing branch
Replies: 653
Views: 82177

EgonHugeist , I've patched the binary data issue (rev.1725) and enabled the CAPI statement back. Delphi tests seem to pass well, but something happened to my Lazarus (ztestall crashes), so I can't check if everything is fine in there. So let's say activating the Real-prepared statments isn't mad fo...
by olehs
03.09.2012, 21:14
Forum: ZeosLib 7.0 Beta Forum
Topic: Full Unicode/Ansi-Support in /testing branch
Replies: 653
Views: 82177

EgonHugeist , Here is a sample statement for bytea, but I can be wrong. PQprepare command='INSERT INTO people (p_name, p_picture) VALUES($1, $2)' nParams=2 paramTypes=0 PQexecPrepared nParams=2 paramValues='text string\0picturedatawith\0inside' paramLength=[0,22] paramFormats=[0,1] But i don't thin...
by olehs
03.09.2012, 19:45
Forum: ZeosLib 7.0 Beta Forum
Topic: Full Unicode/Ansi-Support in /testing branch
Replies: 653
Views: 82177

EgonHugeist,
we don't have to use binary format for all parameters.
Here is the plan.
1. Examine PQdescribePrepared.
2. For parameters of unknown type set apropriate type in paramTypes, 0 - for the rest
3. For Bytea fields set paramFormat to '1' and rest to '0'
4. Pass Bytea 'as is'
by olehs
03.09.2012, 18:31
Forum: ZeosLib 7.0 Beta Forum
Topic: Full Unicode/Ansi-Support in /testing branch
Replies: 653
Views: 82177

EgonHugeist , I read some PG forums and now understand what is going on. PQescapeByteaConn not only encodes bytes using current bytea_output setting, but it also escapes(quotes) the string using current standard_conforming_strings setting. But we just need the first part (encoding), not escaping, b...
by olehs
03.09.2012, 18:07
Forum: ZeosLib 7.0 Beta Forum
Topic: Full Unicode/Ansi-Support in /testing branch
Replies: 653
Views: 82177

EgonHugeist , So what exactly does Postgre expect for an bytea field? as I wrote, it expects \000'\000 if (PG < 9.0) or (PG >=9.0 and bytea_output='escape') \x002700 if (PG >=9.0 and bytea_output='hex'(it's default)) Can you check your PG8.4? No, it doesn't work, because 8.4 supports only escaped s...
by olehs
03.09.2012, 16:40
Forum: ZeosLib 7.0 Beta Forum
Topic: Full Unicode/Ansi-Support in /testing branch
Replies: 653
Views: 82177

EgonHugeist , I think the problem is in PQescapeByteaConn. It's used for escaping strings that are going to be inserted DIRECTLY into SQL query. When we are using it for PQexecPrepared - we get side-effects of PQescapeByteaConn depending on server settings. Here are some examples. For data like #0#...
by olehs
03.09.2012, 16:13
Forum: ZeosLib 7.0 Beta Forum
Topic: Full Unicode/Ansi-Support in /testing branch
Replies: 653
Views: 82177

EgonHugeist,

that's really annoying.
I actually don't know what to patch. The problem is not in tests. Even with SCS=on my tests fail :cry:
by olehs
03.09.2012, 15:43
Forum: ZeosLib 7.0 Beta Forum
Topic: Full Unicode/Ansi-Support in /testing branch
Replies: 653
Views: 82177

EgonHugeist , all right, the main difference is that I'm using PG 8.4 ))) and differences in config (that might cause troubles), mine "client_encoding";"UTF8" "standard_conforming_strings";"off" yours "bytea_output";"escape" "client_e...
by olehs
03.09.2012, 14:51
Forum: ZeosLib 7.0 Beta Forum
Topic: Full Unicode/Ansi-Support in /testing branch
Replies: 653
Views: 82177

EgonHugeist,

let's compare our server settings using
SHOW ALL
by olehs
03.09.2012, 14:33
Forum: ZeosLib 7.0 Beta Forum
Topic: Full Unicode/Ansi-Support in /testing branch
Replies: 653
Views: 82177

EgonHugeist , Ok, here's what I found. When using FPlainDriver.EncodeBYTEA on stBinaryStream in TZPostgreSQLCAPIPreparedStatement.BindInParameters that binary stream is saved in db just as is (escaped). I guess PQexecPrepared doesn't want binary data in Escaped format. If you pass parameters as tex...
by olehs
03.09.2012, 13:47
Forum: ZeosLib 7.0 Beta Forum
Topic: Full Unicode/Ansi-Support in /testing branch
Replies: 653
Views: 82177

Accordingly the test RealPreparedStatment i must say i have no such issues with my battary of compilers.. Sure you are up to date?
Yes, just tried on Delphi7 and XE2 - same error.
Here are contents of both streams.