Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id EED5F632D76 for ; Thu, 12 Aug 2010 12:05:01 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 66525-03 for ; Thu, 12 Aug 2010 15:04:54 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id A49C6632665 for ; Thu, 12 Aug 2010 12:04:53 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o7CF4qia014369; Thu, 12 Aug 2010 11:04:52 -0400 (EDT) To: Dmitriy Igrishin cc: pgsql-hackers@postgresql.org Subject: Re: libpq In-reply-to: References: Comments: In-reply-to Dmitriy Igrishin message dated "Thu, 12 Aug 2010 18:47:42 +0400" Date: Thu, 12 Aug 2010 11:04:52 -0400 Message-ID: <14368.1281625492@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201008/910 X-Sequence-Number: 167713 Dmitriy Igrishin writes: > Is it guaranteed that functions, which accept PGconn* (PGresult*) > properly works if PGconn* (PGresult*) is NULL or is it better to check > on NULL the value of the pointer before calling those functions? I think they all do check for NULL, but whether they give back a default result that's useful for you is harder to say. regards, tom lane