Search found 164 matches

by Wild_Pointer
05.02.2010, 08:12
Forum: ZeosLib 7.0 Beta Forum
Topic: [bug_fixed] AV when PostgreSQL server connection lost
Replies: 18
Views: 1785

mdaems, I agree that this can be done. The question is - should it?... There are no orders in pglib documentation that handle should be freed after connection loss, there are no "nasty AV's" if we don't finish the handle on connection loss (libpq knows it lost connection and you get "...
by Wild_Pointer
04.02.2010, 08:35
Forum: ZeosLib 7.0 Beta Forum
Topic: [bug_fixed] AV when PostgreSQL server connection lost
Replies: 18
Views: 1785

Hello mdaems To start with I'll say I'm referring to PostgreSQL 8.4.2 Documentation: 30.1. Database Connection Control Functions when talking of libpq. It basically says: "Note that if PQconnectStart returns a non-null pointer, you must call PQfinish when you are finished with it, in order to d...
by Wild_Pointer
03.02.2010, 14:37
Forum: Off Topic
Topic: Happy Birthday Mdaems
Replies: 3
Views: 23705

:birthday:
by Wild_Pointer
02.02.2010, 22:31
Forum: ZeosLib 7.0 Beta Forum
Topic: [bug_fixed] AV when PostgreSQL server connection lost
Replies: 18
Views: 1785

trupka, thank you for your answer. Oh, definitely should be, for internal libpq cleanup. Postgres documentation is quite clear about that. I have no doubt PlainDriver.Finish(Handle) should be called. I'm just not sure if it should be called in CheckPostgreSQLError. As handle is a property of connect...
by Wild_Pointer
01.02.2010, 20:26
Forum: ZeosLib 7.0 Beta Forum
Topic: [bug_fixed] AV when PostgreSQL server connection lost
Replies: 18
Views: 1785

Patches

I removed FHandle from Statement Classes. Handle is retrieved using GetConnectionHandle procedure. I think storing connection handle in every statement was wrong.
by Wild_Pointer
01.02.2010, 20:23
Forum: ZeosLib 7.0 Beta Forum
Topic: [bug_fixed] AV when PostgreSQL server connection lost
Replies: 18
Views: 1785

patches

Hello, I upload patches: 1. I removed the connection closing code from CheckPostgreSQLError as this is not in place (imho). Connection is finished when tconnection closes. Also I check if connection is active to know if rollback should be attempted. I removed the var directive from Handle parameter....
by Wild_Pointer
31.01.2010, 14:20
Forum: ZeosLib 7.0 Beta Forum
Topic: [bug_fixed] AV when PostgreSQL server connection lost
Replies: 18
Views: 1785

Hello to all I'd like to share some notices about the patch. It works OK if connection is used for single dataset object. That way on exception it frees the connection on pqlib and on statement. The only problem of that is that if someone tries to ExecSql statement with Handle=nil there is no except...
by Wild_Pointer
31.01.2010, 11:57
Forum: 6.6 - stable
Topic: Dealing with exceptions in Postgresql implementation
Replies: 2
Views: 424

Thank you, Mark.

I've missed the point, that Handle is var parameter now. I just inserted Handle := nil into 6.6.6 version to see if that helps to solve "connection lost" problem, and obviously got negative result.

I'll report problems to the thread you provided.
by Wild_Pointer
28.01.2010, 16:13
Forum: 6.6 - stable
Topic: Dealing with exceptions in Postgresql implementation
Replies: 2
Views: 424

Dealing with exceptions in Postgresql implementation

Hello I'm using postgresql and zeos lib v6.6.6. I noticed that if the connection is lost the exception about that is raised. After that even closing the program generates access violations. I doubt this is normal way of dealing with broken connections :) I guess the source of all evil is CheckPostgr...
by Wild_Pointer
25.01.2010, 09:48
Forum: 6.6 - stable
Topic: Multiple threds accessing single TZquery object
Replies: 3
Views: 661

Guess I was too quick to be happy. :( Maybe I have to create a separate TZConnection for every thread? 2010-01-25 08:54:40 - Event XML parsing error: Access violation at address 0192E459 in module 'LIBEAY32.dll'. Read of address BDA9968C 2010-01-25 08:54:40 - EventServer: Disonnected 192.168.7.201 :...
by Wild_Pointer
25.01.2010, 07:10
Forum: 6.6 - stable
Topic: Multiple threds accessing single TZquery object
Replies: 3
Views: 661

Multiple threds accessing single TZquery object

Hello, recently I've been developing application witch is listening for some port ( TIdTCPServer indy component), getting XML and updating DB according to the XML. For that I created 1 query object that I would pass SQL to. Also I'm using timer to check if there are changes in DB from time to time (...
by Wild_Pointer
18.01.2010, 08:53
Forum: User Contributions
Topic: PostgreSQL cast using ::
Replies: 6
Views: 2384

Hello, ezemasa What I wanted to ask is: for example in postgresql 8.9 operator : appears. In pgAdmin you will write SELECT column:something FROM table. Now in TZQuery we would write SELECT column::something FROM table, as :: is converted to : . How would this query look like after applying your patc...
by Wild_Pointer
15.01.2010, 16:08
Forum: User Contributions
Topic: PostgreSQL cast using ::
Replies: 6
Views: 2384

Ok,

there is is just one hypothetical question - how would one pass single : to postgresql server. (I cant think of reason why you should do it, but...) If I'd want do that now I'd use :: in SQL.text, but if :: is interpreted as :: then what is interpreted as : ? Or am I missing the point here?
by Wild_Pointer
15.01.2010, 08:30
Forum: User Contributions
Topic: PostgreSQL cast using ::
Replies: 6
Views: 2384

Hello, ezemasa

:: is treated as : in query. So instead of SELECT ID, 'HELLO'::varchar FROM TABLE you should write SELECT ID, 'HELLO'::::varchar FROM TABLE

I don't think this should be fixed (or at least that way) because then there would be no way to put single : into sql
by Wild_Pointer
07.01.2010, 16:12
Forum: PostgreSQL
Topic: Transaction Isolation Level
Replies: 5
Views: 4120

Yes - that does the trick. Setting transaction isolation level to tiReadCommited starts the new transaction, then Commit commits it and starts another one, setting to tiNone - cancels the transaction. So in fact instead of 1 transaction you create 2 - the second of them ends as soon as it starts. No...