88 * Portions Copyright (c) 1994, Regents of the University of California
99 *
1010 * IDENTIFICATION
11- * $PostgreSQL: pgsql/src/backend/tcop/dest.c,v 1.66 2005/10/15 02:49:26 momjian Exp $
11+ * $PostgreSQL: pgsql/src/backend/tcop/dest.c,v 1.67 2005/11/03 17:11:38 alvherre Exp $
1212 *
1313 *-------------------------------------------------------------------------
1414 */
@@ -62,20 +62,20 @@ donothingCleanup(DestReceiver *self)
6262 */
6363static DestReceiver donothingDR = {
6464donothingReceive ,donothingStartup ,donothingCleanup ,donothingCleanup ,
65- None
65+ DestNone
6666};
6767
6868static DestReceiver debugtupDR = {
6969debugtup ,debugStartup ,donothingCleanup ,donothingCleanup ,
70- Debug
70+ DestDebug
7171};
7272
7373static DestReceiver spi_printtupDR = {
7474spi_printtup ,spi_dest_startup ,donothingCleanup ,donothingCleanup ,
75- SPI
75+ DestSPI
7676};
7777
78- /* Globally available receiver forNone */
78+ /* Globally available receiver forDestNone */
7979DestReceiver * None_Receiver = & donothingDR ;
8080
8181
@@ -92,33 +92,33 @@ BeginCommand(const char *commandTag, CommandDest dest)
9292/* ----------------
9393 *CreateDestReceiver - return appropriate receiver function set for dest
9494 *
95- * Note: a Portal must be specified for destinationsRemote, RemoteExecute ,
96- * andTuplestore. It can be NULL for the others.
95+ * Note: a Portal must be specified for destinationsDestRemote ,
96+ *DestRemoteExecute, andDestTuplestore. It can be NULL for the others.
9797 * ----------------
9898 */
9999DestReceiver *
100100CreateDestReceiver (CommandDest dest ,Portal portal )
101101{
102102switch (dest )
103103{
104- case Remote :
105- case RemoteExecute :
104+ case DestRemote :
105+ case DestRemoteExecute :
106106if (portal == NULL )
107- elog (ERROR ,"no portal specified forRemote receiver" );
107+ elog (ERROR ,"no portal specified forDestRemote receiver" );
108108return printtup_create_DR (dest ,portal );
109109
110- case None :
110+ case DestNone :
111111return & donothingDR ;
112112
113- case Debug :
113+ case DestDebug :
114114return & debugtupDR ;
115115
116- case SPI :
116+ case DestSPI :
117117return & spi_printtupDR ;
118118
119- case Tuplestore :
119+ case DestTuplestore :
120120if (portal == NULL )
121- elog (ERROR ,"no portal specified forTuplestore receiver" );
121+ elog (ERROR ,"no portal specified forDestTuplestore receiver" );
122122if (portal -> holdStore == NULL ||
123123portal -> holdContext == NULL )
124124elog (ERROR ,"portal has no holdStore" );
@@ -139,15 +139,15 @@ EndCommand(const char *commandTag, CommandDest dest)
139139{
140140switch (dest )
141141{
142- case Remote :
143- case RemoteExecute :
142+ case DestRemote :
143+ case DestRemoteExecute :
144144pq_puttextmessage ('C' ,commandTag );
145145break ;
146146
147- case None :
148- case Debug :
149- case SPI :
150- case Tuplestore :
147+ case DestNone :
148+ case DestDebug :
149+ case DestSPI :
150+ case DestTuplestore :
151151break ;
152152}
153153}
@@ -169,8 +169,8 @@ NullCommand(CommandDest dest)
169169{
170170switch (dest )
171171{
172- case Remote :
173- case RemoteExecute :
172+ case DestRemote :
173+ case DestRemoteExecute :
174174
175175/*
176176 * tell the fe that we saw an empty query string. In protocols
@@ -182,10 +182,10 @@ NullCommand(CommandDest dest)
182182pq_puttextmessage ('I' ,"" );
183183break ;
184184
185- case None :
186- case Debug :
187- case SPI :
188- case Tuplestore :
185+ case DestNone :
186+ case DestDebug :
187+ case DestSPI :
188+ case DestTuplestore :
189189break ;
190190}
191191}
@@ -206,8 +206,8 @@ ReadyForQuery(CommandDest dest)
206206{
207207switch (dest )
208208{
209- case Remote :
210- case RemoteExecute :
209+ case DestRemote :
210+ case DestRemoteExecute :
211211if (PG_PROTOCOL_MAJOR (FrontendProtocol ) >=3 )
212212{
213213StringInfoData buf ;
@@ -222,10 +222,10 @@ ReadyForQuery(CommandDest dest)
222222pq_flush ();
223223break ;
224224
225- case None :
226- case Debug :
227- case SPI :
228- case Tuplestore :
225+ case DestNone :
226+ case DestDebug :
227+ case DestSPI :
228+ case DestTuplestore :
229229break ;
230230}
231231}