Search found 118 matches

by olehs
25.07.2012, 09:34
Forum: ZeosLib 7.0 Beta Forum
Topic: [patch_done] TZStoredProc doesn't return any returnValue/set
Replies: 15
Views: 3724

Well, that's not all. That patch only works for procedures returning single value or set of values.

To make this all work more patches are required. There are few problems with procedures returning record types etc.
by olehs
25.07.2012, 08:52
Forum: ZeosLib 7.0 Beta Forum
Topic: [patch_done] TZStoredProc doesn't return any returnValue/set
Replies: 15
Views: 3724

EgonHugeist , Ok. Then I'll just leave this patch with my FetchOutParams implementation for TZPostgreSQLCallableStatement here. I used ResultSet to retrieve values of the first row from output. But to make it work I had to remove rtForwardOnly check in TZPostgreSQLResultSet.MoveAbsolute, because it...
by olehs
24.07.2012, 21:07
Forum: 6.6 - stable
Topic: [patch_done] Input parameter count is less then expected
Replies: 18
Views: 3036

EgonHugeist,

I found a one more place, where you might also want to use SetStatementParam:
TZUpdateSQL.FillStatement
by olehs
24.07.2012, 15:24
Forum: ZeosLib 7.0 Beta Forum
Topic: [patch_done] Strings like E'\\' are incorrectly tokenized
Replies: 51
Views: 5990

EgonHugeist , Still testing, but seems to work fine. And what about TZPostgreSQLConnection.GetEscapeString? A query like q.SQL.Text := 'select * from sys_values where sysval_name = :sn'; q.ParamByName('sn').AsString := 'QMenu\QUICKMENUROWCOUNT'; And I get final query like select * from sys_values w...
by olehs
24.07.2012, 13:15
Forum: ZeosLib 7.0 Beta Forum
Topic: [patch_done] Strings like E'\\' are incorrectly tokenized
Replies: 51
Views: 5990

EgonHugeist , How about reverting to old MySQL implementaion just for PG? {** Return a quoted string token from a reader. This method will collect characters until it sees a match to the character that the tokenizer used to switch to this state. @return a quoted string token from a reader } functio...
by olehs
24.07.2012, 13:00
Forum: ZeosLib 7.0 Beta Forum
Topic: [patch_done] Strings like E'\\' are incorrectly tokenized
Replies: 51
Views: 5990

EgonHugeist,

checked rev.1576. Tried it with testcase
select '\\' || :str

and got

Code: Select all

2012-07-24 14:55:01 cat: Execute, proto: postgresql-8, msg: select '\\' || ?, errcode: 0, error: ERROR:  syntax error at end of input
LINE 1: select '\\' || ?
                        ^
by olehs
24.07.2012, 12:44
Forum: ZeosLib 7.0 Beta Forum
Topic: [patch_done] Strings like E'\\' are incorrectly tokenized
Replies: 51
Views: 5990

One more thing. Seems like TZPostgreSQLConnection.GetEscapeString does exactly opposite to what I described about standard_conforming_strings.

When ON - it encodes it, but it shouldn't.
by olehs
24.07.2012, 12:40
Forum: ZeosLib 7.0 Beta Forum
Topic: [patch_done] Strings like E'\\' are incorrectly tokenized
Replies: 51
Views: 5990

Ok, I'll check it.
By the way, found a little bug.
by olehs
24.07.2012, 08:56
Forum: ZeosLib 7.0 Beta Forum
Topic: [patch_done] Strings like E'\\' are incorrectly tokenized
Replies: 51
Views: 5990

EgonHugeist , I didn't actually get your question about fullunicode IDEs. If you are talking about Preprepare property - it's probably not needed in there, because Strings are always unicode. So you always have to cast/encode it to ClientEncoding without escaping. Such strings can even be mixed wit...
by olehs
24.07.2012, 07:32
Forum: ZeosLib 7.0 Beta Forum
Topic: [patch_done] TZStoredProc doesn't return any returnValue/set
Replies: 15
Views: 3724

Can't find that thread. Was it dropped for good? )
by olehs
23.07.2012, 23:32
Forum: ZeosLib 7.0 Beta Forum
Topic: [patch_done] Strings like E'\\' are incorrectly tokenized
Replies: 51
Views: 5990

One more thing:
valid quote escape syntax is ''(two quotes), but depending on
backslash_quote parameter, it is possible to use \' to escape quote
by olehs
23.07.2012, 23:24
Forum: ZeosLib 7.0 Beta Forum
Topic: [patch_done] Strings like E'\\' are incorrectly tokenized
Replies: 51
Views: 5990

Well, it's not that easy as I thought. Many things in tokenizing PostreSQL strings depend on standard_conforming_strings parameter. So I'll have to give samples for both cases. standard_conforming_strings=on In this case backslashes are treated just as they are: '\\' is treated as \\ '\n' = \n '\' =...
by olehs
23.07.2012, 22:22
Forum: 6.6 - stable
Topic: [patch_done] Input parameter count is less then expected
Replies: 18
Views: 3036

Yes, everything's fine.
Thank you!
by olehs
23.07.2012, 22:15
Forum: ZeosLib 7.0 Beta Forum
Topic: [patch_done] Strings like E'\\' are incorrectly tokenized
Replies: 51
Views: 5990

EgonHugeist , didn't want to confuse you. Postgre tokenizer uses inherited (MySql) tokenizer. Look at this part of TZMySQLQuoteState.NextToken end; end; end else if (ReadChar = BackSlash) and (TempLastChar = BackSlash) then Result.TokenType := ttEscapedQuoted end else if ReadChar = BackSlash then T...
by olehs
23.07.2012, 21:26
Forum: ZeosLib 7.0 Beta Forum
Topic: [patch_done] Strings like E'\\' are incorrectly tokenized
Replies: 51
Views: 5990

[patch_done] Strings like E'\\' are incorrectly tokenized

I guess error is in TZMySQLQuoteState.NextToken