Skip site navigation (1) Skip section navigation (2)

Re: PGRES_POLLING_ACTIVE is unused...

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Lennert Buytenhek <buytenh(at)gnu(dot)org>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: PGRES_POLLING_ACTIVE is unused...
Date: 2003-03-17 19:56:53
Message-ID: 200303171956.h2HJurP19507@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Your patch has been added to the PostgreSQL unapplied patches list at:

	http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------


Lennert Buytenhek wrote:
> ...any reason why it is there at all?
> 
> (Please CC, not on this list.)
> 
> 
> 
> diff -urN postgresql-7.3.2.orig/doc/src/sgml/libpq.sgml postgresql-7.3.2/doc/src/sgml/libpq.sgml
> --- postgresql-7.3.2.orig/doc/src/sgml/libpq.sgml	2003-01-30 20:50:07.000000000 +0100
> +++ postgresql-7.3.2/doc/src/sgml/libpq.sgml	2003-02-26 17:20:34.000000000 +0100
> @@ -316,9 +316,7 @@
>    </para>
>    <para>
>     If <function>PQconnectStart</> succeeds, the next stage is to poll <application>libpq</> so that it may
> -   proceed with the connection sequence.  Loop thus: Consider a connection
> -   <quote>inactive</quote> by default. If <function>PQconnectPoll</function> last returned <symbol>PGRES_POLLING_ACTIVE</>,
> -   consider it <quote>active</quote> instead. If <function>PQconnectPoll(conn)</function> last returned
> +   proceed with the connection sequence.  Loop thus: If <function>PQconnectPoll(conn)</function> last returned
>     <symbol>PGRES_POLLING_READING</symbol>, perform a <function>select()</> for reading on <function>PQsocket(conn)</function>. If
>     it last returned <symbol>PGRES_POLLING_WRITING</symbol>, perform a <function>select()</> for writing on
>     <function>PQsocket(conn)</function>. If you have yet to call <function>PQconnectPoll</function>, i.e. after the call
> diff -urN postgresql-7.3.2.orig/src/interfaces/libpq/fe-connect.c postgresql-7.3.2/src/interfaces/libpq/fe-connect.c
> --- postgresql-7.3.2.orig/src/interfaces/libpq/fe-connect.c	2003-01-30 20:50:07.000000000 +0100
> +++ postgresql-7.3.2/src/interfaces/libpq/fe-connect.c	2003-02-26 17:19:04.000000000 +0100
> @@ -1090,9 +1090,6 @@
>  		 */
>  		switch (flag)
>  		{
> -			case PGRES_POLLING_ACTIVE:
> -				break;
> -
>  			case PGRES_POLLING_OK:
>  				return 1;		/* success! */
>  
> @@ -1804,9 +1801,6 @@
>  		 */
>  		switch (flag)
>  		{
> -			case PGRES_POLLING_ACTIVE:
> -				break;
> -
>  			case PGRES_POLLING_OK:
>  				return true;	/* success! */
>  
> diff -urN postgresql-7.3.2.orig/src/interfaces/libpq/libpq-fe.h postgresql-7.3.2/src/interfaces/libpq/libpq-fe.h
> --- postgresql-7.3.2.orig/src/interfaces/libpq/libpq-fe.h	2002-09-04 22:31:47.000000000 +0200
> +++ postgresql-7.3.2/src/interfaces/libpq/libpq-fe.h	2003-02-26 17:19:22.000000000 +0100
> @@ -65,7 +65,6 @@
>  	PGRES_POLLING_READING,		/* These two indicate that one may	  */
>  	PGRES_POLLING_WRITING,		/* use select before polling again.   */
>  	PGRES_POLLING_OK,
> -	PGRES_POLLING_ACTIVE		/* Can call poll function immediately. */
>  } PostgresPollingStatusType;
>  
>  typedef enum
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
> http://archives.postgresql.org
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-patches by date

Next:From: Bruce MomjianDate: 2003-03-17 19:57:10
Subject: Re: PGRES_POLLING_ACTIVE is unused...
Previous:From: Bruce MomjianDate: 2003-03-17 19:53:55
Subject: Re: Patch to fix horology regression failure

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group