2011/4/2 Devrim GÜNDÜZ <dev...@gunduz.org>:
>
> I'm getting the following message after upgrading to Alpha5 on my Fedora
> 14 box:
>
> $ psql -p 5433
> psql: connection pointer is NULL
>
> which comes from libpq. Server is running, and I can connect it to via
> 9.0's psql.
>
> This is a regular RPM build. Am I doing something wrong, or?

I couldn't reproduce this (using upstream source on Ubuntu).  However,
I did find a little bug in libpq causing the connection handle to
become NULL in the event of an option parsing error.  This bug has
been around since release 9.0.0, and may be unrelated to the problem.


Joey Adams
From 5bcf99b6481dd1393525ee804eeae6a04999d86d Mon Sep 17 00:00:00 2001
From: Joey Adams <joeyadams3.14...@gmail.com>
Date: Sat, 2 Apr 2011 14:27:22 -0400
Subject: [PATCH] Fixed "return false;" in PQconnectStartParams, which returns a PGconn *

---
 src/interfaces/libpq/fe-connect.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index a4959ee..aa24c37 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -491,7 +491,7 @@ PQconnectStartParams(const char **keywords,
 	{
 		conn->status = CONNECTION_BAD;
 		/* errorMessage is already set */
-		return false;
+		return conn;
 	}
 
 	/*
-- 
1.7.1

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to