⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 util.c

📁 关系型数据库 Postgresql 6.5.2
💻 C
字号:
/*------------------------------------------------------------------------- * * util.c *	  general routines for libpq backend * * Copyright (c) 1994, Regents of the University of California * *	$Id: util.c,v 1.9 1999/05/25 16:09:03 momjian Exp $ * *------------------------------------------------------------------------- *//* *	 UTILITY ROUTINES *		pqdebug			- send a string to the debugging output port *		pqdebug2		- send two strings to stdout *		PQtrace			- turn on pqdebug() tracing *		PQuntrace		- turn off pqdebug() tracing */#include <stdio.h>#include <string.h>#include <postgres.h>#include <lib/dllist.h>#include <libpq/libpq.h>		/* where the declarations go */#include <utils/exc.h>/* ---------------- *		exceptions * ---------------- */Exception	MemoryError = {"Memory Allocation Error"};Exception	PortalError = {"Invalid arguments to portal functions"};Exception	PostquelError = {"Sql Error"};Exception	ProtocolError = {"Protocol Error"};char		PQerrormsg[ERROR_MSG_LENGTH];int			PQtracep = 0;		/* 1 to print out debugging messages */FILE	   *debug_port = (FILE *) NULL;/* ---------------------------------------------------------------- *						PQ utility routines * ---------------------------------------------------------------- */voidpqdebug(char *target, char *msg){	if (!target)		return;	if (PQtracep)	{		/*		 * if nothing else was suggested default to stdout		 */		if (!debug_port)			debug_port = stdout;		fprintf(debug_port, target, msg);		fprintf(debug_port, "\n");	}}voidpqdebug2(char *target, char *msg1, char *msg2){	if (!target)		return;	if (PQtracep)	{		/*		 * if nothing else was suggested default to stdout		 */		if (!debug_port)			debug_port = stdout;		fprintf(debug_port, target, msg1, msg2);		fprintf(debug_port, "\n");	}}/* -------------------------------- *		PQtrace() / PQuntrace() * -------------------------------- */voidPQtrace(){	PQtracep = 1;}voidPQuntrace(){	PQtracep = 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -