[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] postgresql tests/run.scm line 17 ff.
From: |
Herr |
Subject: |
Re: [Chicken-users] postgresql tests/run.scm line 17 ff. |
Date: |
Sun, 03 Mar 2013 16:03:29 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 |
Am 03.03.2013 11:30, schrieb Peter Bex:
> On Sun, Mar 03, 2013 at 12:05:34AM +0100, Herr wrote:
> Yeah, this looks fishy. Changing the predicate won't help though; it
> just checks that the object is a connection structure, which is still
> true after a disconnection. The test is bogus and I've removed it (but
> I haven't tagged a new release yet).
>> In the second test the return value is from reset-connection, which is
>> problably
>> void.
>
> This test is not verifying the return value, but it's checking that an
> error is raised after resetting a nonexistent connection; test-error
> does this and ignores the return value.
Ops.
> Like I said, it just checks the object type, not whether the connection
> is still alive. libpq offers no way to check this. I could check whether
> the connection-pointer is NULL, but it being not-NULL is no guarantee
> that the underlying connection is still alive.
I see a PQstatus function in the PG 9.1 docs, chapter 31.2, and it takes of
course a
conn pointer as parameter. Might be a candidate.
> Thanks for pointing out the bogus test!
My pleasure. I am not through checking it all yet ;-)
I have been using postgresql a lot in Tcl and PHP, but scheme is new to me.
/Str.
- [Chicken-users] postgresql tests/run.scm line 17 ff., Herr, 2013/03/02
- Re: [Chicken-users] postgresql tests/run.scm line 17 ff., Peter Bex, 2013/03/03
- Re: [Chicken-users] postgresql tests/run.scm line 17 ff.,
Herr <=
- Re: [Chicken-users] postgresql tests/run.scm line 17 ff., Peter Bex, 2013/03/03
- Re: [Chicken-users] postgresql tests/run.scm line 17 ff., Herr, 2013/03/03
- Re: [Chicken-users] postgresql tests/run.scm line 17 ff., Peter Bex, 2013/03/03
- Re: [Chicken-users] postgresql tests/run.scm line 17 ff., Herr, 2013/03/03
- Re: [Chicken-users] postgresql tests/run.scm line 17 ff., Herr, 2013/03/03