亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? dest.c

?? 關(guān)系型數(shù)據(jù)庫 Postgresql 6.5.2
?? C
字號:
/*------------------------------------------------------------------------- * * dest.c *	  support for various communication destinations - see include/tcop/dest.h * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION *	  $Header: /usr/local/cvsroot/pgsql/src/backend/tcop/dest.c,v 1.31 1999/05/25 22:42:06 momjian Exp $ * *------------------------------------------------------------------------- *//* *	 INTERFACE ROUTINES *		BeginCommand - prepare destination for tuples of the given type *		DestToFunction - identify per-tuple processing routines *		EndCommand - tell destination that no more tuples will arrive *		NullCommand - tell dest that an empty query string was recognized *		ReadyForQuery - tell dest that we are ready for a new query * *	 NOTES *		These routines do the appropriate work before and after *		tuples are returned by a query to keep the backend and the *		"destination" portals synchronized. * *		There is a second level of initialization/cleanup performed by the *		setup/cleanup routines identified by DestToFunction.  This could *		probably be merged with the work done by BeginCommand/EndCommand, *		but as of right now BeginCommand/EndCommand are used in a rather *		unstructured way --- some places call Begin without End, some vice *		versa --- so I think I'll just leave 'em alone for now.  tgl 1/99. * */#include <stdio.h>				/* for sprintf() */#include <string.h>#include "postgres.h"#include "access/htup.h"#include "libpq/libpq.h"#include "libpq/pqformat.h"#include "access/printtup.h"#include "utils/portal.h"#include "utils/palloc.h"#include "executor/executor.h"#include "tcop/dest.h"#include "catalog/pg_type.h"#include "utils/mcxt.h"#include "commands/async.h"static char CommandInfo[32] = {0};/* ---------------- *		dummy DestReceiver functions * ---------------- */static voiddonothingReceive(HeapTuple tuple, TupleDesc typeinfo, DestReceiver *self){}static voiddonothingSetup(DestReceiver *self, TupleDesc typeinfo){}static voiddonothingCleanup(DestReceiver *self){}/* ---------------- *		static DestReceiver structs for dest types needing no local state * ---------------- */static DestReceiver donothingDR = {	donothingReceive, donothingSetup, donothingCleanup};static DestReceiver printtup_internalDR = {	printtup_internal, donothingSetup, donothingCleanup};static DestReceiver be_printtupDR = {	be_printtup, donothingSetup, donothingCleanup};static DestReceiver debugtupDR = {	debugtup, donothingSetup, donothingCleanup};static DestReceiver spi_printtupDR = {	spi_printtup, donothingSetup, donothingCleanup};/* ---------------- *		BeginCommand - prepare destination for tuples of the given type * ---------------- */voidBeginCommand(char *pname,			 int operation,			 TupleDesc tupdesc,			 bool isIntoRel,			 bool isIntoPortal,			 char *tag,			 CommandDest dest){	PortalEntry *entry;	Form_pg_attribute *attrs = tupdesc->attrs;	int			natts = tupdesc->natts;	int			i;	char	   *p;	switch (dest)	{		case Remote:		case RemoteInternal:			/* ----------------			 *		if this is a "retrieve portal" query, done			 *		because nothing needs to be sent to the fe.			 * ----------------			 */			CommandInfo[0] = '\0';			if (isIntoPortal)				break;			/* ----------------			 *		if portal name not specified for remote query,			 *		use the "blank" portal.			 * ----------------			 */			if (pname == NULL)				pname = "blank";			/* ----------------			 *		send fe info on tuples we're about to send			 * ----------------			 */			pq_puttextmessage('P', pname);			/* ----------------			 *		if this is a retrieve, then we send back the tuple			 *		descriptor of the tuples.  "retrieve into" is an			 *		exception because no tuples are returned in that case.			 * ----------------			 */			if (operation == CMD_SELECT && !isIntoRel)			{				StringInfoData buf;				pq_beginmessage(&buf);				pq_sendbyte(&buf, 'T'); /* tuple descriptor message type */				pq_sendint(&buf, natts, 2);		/* # of attributes in												 * tuples */				for (i = 0; i < natts; ++i)				{					pq_sendstring(&buf, attrs[i]->attname.data);					pq_sendint(&buf, (int) attrs[i]->atttypid,							   sizeof(attrs[i]->atttypid));					pq_sendint(&buf, attrs[i]->attlen,							   sizeof(attrs[i]->attlen));					if (PG_PROTOCOL_MAJOR(FrontendProtocol) >= 2)						pq_sendint(&buf, attrs[i]->atttypmod,								   sizeof(attrs[i]->atttypmod));				}				pq_endmessage(&buf);			}			break;		case Local:			/* ----------------			 *		prepare local portal buffer for query results			 *		and setup result for PQexec()			 * ----------------			 */			entry = be_currentportal();			if (pname != NULL)				pbuf_setportalinfo(entry, pname);			if (operation == CMD_SELECT && !isIntoRel)			{				be_typeinit(entry, tupdesc, natts);				p = (char *) palloc(strlen(entry->name) + 2);				p[0] = 'P';				strcpy(p + 1, entry->name);			}			else			{				p = (char *) palloc(strlen(tag) + 2);				p[0] = 'C';				strcpy(p + 1, tag);			}			entry->result = p;			break;		case Debug:			/* ----------------			 *		show the return type of the tuples			 * ----------------			 */			if (pname == NULL)				pname = "blank";			showatts(pname, tupdesc);			break;		case None:		default:			break;	}}/* ---------------- *		DestToFunction - return appropriate receiver function set for dest * ---------------- */DestReceiver *DestToFunction(CommandDest dest){	switch (dest)	{			case Remote:			/* printtup wants a dynamically allocated DestReceiver */			return printtup_create_DR();			break;		case RemoteInternal:			return &printtup_internalDR;			break;		case Local:			return &be_printtupDR;			break;		case Debug:			return &debugtupDR;			break;		case SPI:			return &spi_printtupDR;			break;		case None:		default:			return &donothingDR;			break;	}	/*	 * never gets here, but DECstation lint appears to be stupid...	 */	return &donothingDR;}/* ---------------- *		EndCommand - tell destination that no more tuples will arrive * ---------------- */voidEndCommand(char *commandTag, CommandDest dest){	char		buf[64];	switch (dest)	{		case Remote:		case RemoteInternal:			/* ----------------			 *		tell the fe that the query is over			 * ----------------			 */			sprintf(buf, "%s%s", commandTag, CommandInfo);			pq_puttextmessage('C', buf);			CommandInfo[0] = '\0';			break;		case Local:		case Debug:		case None:		default:			break;	}}/* * These are necessary to sync communications between fe/be processes doing * COPY rel TO stdout * * or * * COPY rel FROM stdin * * NOTE: the message code letters are changed at protocol version 2.0 * to eliminate possible confusion with data tuple messages. */voidSendCopyBegin(void){	if (PG_PROTOCOL_MAJOR(FrontendProtocol) >= 2)		pq_putbytes("H", 1);	/* new way */	else		pq_putbytes("B", 1);	/* old way */}voidReceiveCopyBegin(void){	if (PG_PROTOCOL_MAJOR(FrontendProtocol) >= 2)		pq_putbytes("G", 1);	/* new way */	else		pq_putbytes("D", 1);	/* old way */	/* We *must* flush here to ensure FE knows it can send. */	pq_flush();}/* ---------------- *		NullCommand - tell dest that an empty query string was recognized * *		In FE/BE protocol version 1.0, this hack is necessary to support *		libpq's crufty way of determining whether a multiple-command *		query string is done.  In protocol 2.0 it's probably not really *		necessary to distinguish empty queries anymore, but we still do it *		for backwards compatibility with 1.0. * ---------------- */voidNullCommand(CommandDest dest){	switch (dest)	{			case RemoteInternal:			case Remote:			/* ----------------			 *		tell the fe that we saw an empty query string			 * ----------------			 */			pq_putbytes("I", 2);/* note we send I and \0 */			break;		case Local:		case Debug:		case None:		default:			break;	}}/* ---------------- *		ReadyForQuery - tell dest that we are ready for a new query * *		The ReadyForQuery message is sent in protocol versions 2.0 and up *		so that the FE can tell when we are done processing a query string. * *		Note that by flushing the stdio buffer here, we can avoid doing it *		most other places and thus reduce the number of separate packets sent. * ---------------- */voidReadyForQuery(CommandDest dest){	switch (dest)	{			case RemoteInternal:			case Remote:			if (PG_PROTOCOL_MAJOR(FrontendProtocol) >= 2)				pq_putbytes("Z", 1);			/* Flush output at end of cycle in any case. */			pq_flush();			break;		case Local:		case Debug:		case None:		default:			break;	}}voidUpdateCommandInfo(int operation, Oid lastoid, uint32 tuples){	switch (operation)	{			case CMD_INSERT:			if (tuples > 1)				lastoid = InvalidOid;			sprintf(CommandInfo, " %u %u", lastoid, tuples);			break;		case CMD_DELETE:		case CMD_UPDATE:			sprintf(CommandInfo, " %u", tuples);			break;		default:			CommandInfo[0] = '\0';			break;	}}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
韩国成人在线视频| 1024国产精品| 精品亚洲porn| 久久久不卡影院| 国产99久久久精品| 亚洲欧洲精品一区二区三区| 色婷婷久久久亚洲一区二区三区| 亚洲影院久久精品| 日韩一级片在线播放| 国产成人自拍高清视频在线免费播放| 久久精品视频免费| 色噜噜狠狠色综合中国| 五月婷婷久久丁香| 日韩欧美国产一二三区| 成人综合在线观看| 亚洲国产综合视频在线观看| 日韩三级视频在线看| 成人午夜免费av| 亚洲一级片在线观看| 精品国产欧美一区二区| 成人毛片在线观看| 偷拍日韩校园综合在线| 国产亚洲短视频| 在线观看日韩av先锋影音电影院| 日本在线观看不卡视频| 日本一区二区三区国色天香| 欧美在线一区二区三区| 国产美女主播视频一区| 亚洲国产一二三| 久久蜜桃香蕉精品一区二区三区| 色婷婷综合五月| 国产老妇另类xxxxx| 亚洲一区成人在线| 欧美国产国产综合| 7777精品伊人久久久大香线蕉的| 国产不卡视频一区二区三区| 午夜精品久久久久久久99樱桃| 久久伊人中文字幕| 欧美精品第1页| 91在线免费看| 国产呦萝稀缺另类资源| 亚洲一区在线观看网站| 中文字幕免费一区| 精品国免费一区二区三区| 欧美在线一二三四区| 国产成人综合在线播放| 久88久久88久久久| 亚洲成a人片在线观看中文| 国产精品剧情在线亚洲| 精品国产三级a在线观看| 欧美日韩一卡二卡三卡 | 成人av在线观| 精品亚洲国内自在自线福利| 一区二区视频在线| 久久久久久一级片| 日韩午夜电影av| 精品视频免费看| 色综合色综合色综合| 国产福利一区二区三区视频在线| 免费高清视频精品| 五月婷婷欧美视频| 亚洲国产综合91精品麻豆| 中文字幕一区二区日韩精品绯色| 久久久久久久精| 久久综合久久综合亚洲| 91精品婷婷国产综合久久竹菊| 欧美色精品在线视频| 91啪在线观看| 91女人视频在线观看| bt欧美亚洲午夜电影天堂| 国产99久久久久| 成人亚洲一区二区一| 国产91丝袜在线18| 丁香婷婷综合激情五月色| 国产成人在线网站| 成人免费视频视频| 成人高清在线视频| av一区二区久久| 一本大道久久a久久精品综合| 色综合久久中文字幕| 色综合激情久久| 欧美日韩黄视频| 91.xcao| 日韩视频一区在线观看| 欧美成人a视频| 久久嫩草精品久久久久| 欧美激情艳妇裸体舞| 综合久久国产九一剧情麻豆| 亚洲日本电影在线| 亚洲高清久久久| 麻豆91精品视频| 国产.欧美.日韩| 91美女福利视频| 91麻豆精品久久久久蜜臀| 欧美videofree性高清杂交| 久久久亚洲综合| 亚洲欧美国产三级| 亚洲国产日产av| 精品一区二区三区免费观看| 国产黑丝在线一区二区三区| 99国产精品久久久久| 欧美浪妇xxxx高跟鞋交| 日韩女优视频免费观看| 国产欧美精品一区| 亚洲亚洲人成综合网络| 蜜桃av一区二区在线观看| 丁香天五香天堂综合| 在线一区二区视频| 日韩美一区二区三区| 日本一区二区三区电影| 亚洲综合色噜噜狠狠| 九九精品视频在线看| aaa亚洲精品| 91麻豆精品国产91久久久久久久久 | 精品久久久三级丝袜| 国产精品久久一卡二卡| 日韩国产在线一| 成人午夜免费视频| 在线播放中文一区| 国产精品国产精品国产专区不蜜 | 欧美三级视频在线| 久久综合国产精品| 亚洲最新视频在线播放| 国内外成人在线| 欧美性一二三区| 欧美高清在线一区| 婷婷国产在线综合| 99久久伊人网影院| 欧美xxx久久| 亚洲国产日产av| thepron国产精品| 日韩欧美一级二级三级| 亚洲精品你懂的| 成人美女视频在线观看| 日韩精品一区二区在线| 伊人色综合久久天天| 从欧美一区二区三区| 欧美成人精精品一区二区频| 一区二区三区在线观看国产| 国产露脸91国语对白| 日韩欧美一级在线播放| 亚洲小少妇裸体bbw| aaa欧美大片| 国产欧美日韩综合精品一区二区| 青青草视频一区| 欧美日本一区二区在线观看| 亚洲精品久久嫩草网站秘色| 国产91综合网| 国产亚洲一区二区在线观看| 久久99精品久久久久久国产越南 | 亚洲chinese男男1069| 成人av在线影院| 国产视频一区不卡| 久久国产尿小便嘘嘘尿| 欧美高清视频在线高清观看mv色露露十八 | 欧美精选午夜久久久乱码6080| 亚洲视频 欧洲视频| 成人动漫视频在线| 国产视频一区二区在线观看| 国产一区二区久久| 欧美大度的电影原声| 人人爽香蕉精品| 日韩一区二区在线看| 日韩国产欧美在线播放| 91精品久久久久久蜜臀| 亚洲成人在线免费| 欧美军同video69gay| 亚洲电影一区二区| 欧美日韩在线免费视频| 亚洲一区二区三区在线播放| 欧洲av在线精品| 午夜激情一区二区三区| 欧美老年两性高潮| 美女一区二区三区在线观看| 欧美一区二视频| 裸体在线国模精品偷拍| 久久综合精品国产一区二区三区| 极品少妇一区二区| 久久精品夜夜夜夜久久| 成人国产精品视频| 亚洲另类在线视频| 欧美午夜精品久久久久久孕妇| 亚洲国产中文字幕| 欧美大片拔萝卜| 国产精品91xxx| 亚洲免费大片在线观看| 欧美日韩在线一区二区| 免费成人美女在线观看.| 欧美va亚洲va香蕉在线| 成人激情小说网站| 亚洲男人电影天堂| 7777精品伊人久久久大香线蕉经典版下载| 三级影片在线观看欧美日韩一区二区| 欧美一级黄色片| 国产成人免费av在线| 亚洲欧美日韩综合aⅴ视频| 在线观看国产日韩| 蜜臀av性久久久久蜜臀aⅴ流畅| 国产亚洲精品资源在线26u| 99re成人精品视频|