/*
- * $PostgreSQL: pgsql/contrib/spi/autoinc.c,v 1.15 2008/05/17 01:28:22 adunstan Exp $
+ * $PostgreSQL: pgsql/contrib/spi/autoinc.c,v 1.16 2009/01/07 13:44:36 tgl Exp $
*/
+#include "postgres.h"
-#include "executor/spi.h" /* this is what you need to work with SPI */
-#include "commands/trigger.h" /* -"- and triggers */
-#include "commands/sequence.h" /* for nextval() */
+#include "catalog/pg_type.h"
+#include "commands/sequence.h"
+#include "commands/trigger.h"
+#include "executor/spi.h"
+#include "utils/builtins.h"
PG_MODULE_MAGIC;
/*
* insert_username.c
* $Modified: Thu Oct 16 08:13:42 1997 by brook $
- * $PostgreSQL: pgsql/contrib/spi/insert_username.c,v 1.16 2008/03/25 22:42:42 tgl Exp $
+ * $PostgreSQL: pgsql/contrib/spi/insert_username.c,v 1.17 2009/01/07 13:44:36 tgl Exp $
*
* insert user name in response to a trigger
* usage: insert_username (column_name)
*/
+#include "postgres.h"
-#include "executor/spi.h" /* this is what you need to work with SPI */
-#include "commands/trigger.h" /* -"- and triggers */
-#include "miscadmin.h" /* for GetUserName() */
+#include "catalog/pg_type.h"
+#include "commands/trigger.h"
+#include "executor/spi.h"
+#include "miscadmin.h"
+#include "utils/builtins.h"
PG_MODULE_MAGIC;
/*
moddatetime.c
-$PostgreSQL: pgsql/contrib/spi/moddatetime.c,v 1.14 2007/02/01 19:10:23 momjian Exp $
+$PostgreSQL: pgsql/contrib/spi/moddatetime.c,v 1.15 2009/01/07 13:44:36 tgl Exp $
What is this?
It is a function to be called from a trigger for the purpose of updating
Jan Wieck <jwieck@debis.com> who told me about the timestamp_in("now") function.
OH, me, I'm Terry Mackintosh <terry@terrym.com>
*/
+#include "postgres.h"
-#include "executor/spi.h" /* this is what you need to work with SPI */
-#include "commands/trigger.h" /* -"- and triggers */
+#include "catalog/pg_type.h"
+#include "executor/spi.h"
+#include "commands/trigger.h"
PG_MODULE_MAGIC;
/*
- * $PostgreSQL: pgsql/contrib/spi/refint.c,v 1.33 2008/05/17 01:28:22 adunstan Exp $
+ * $PostgreSQL: pgsql/contrib/spi/refint.c,v 1.34 2009/01/07 13:44:36 tgl Exp $
*
*
* refint.c -- set of functions to define referential integrity
* constraints using general triggers.
*/
+#include "postgres.h"
-#include "executor/spi.h" /* this is what you need to work with SPI */
-
-#include "commands/trigger.h" /* -"- and triggers */
#include <ctype.h>
+#include "commands/trigger.h"
+#include "executor/spi.h"
+#include "utils/builtins.h"
PG_MODULE_MAGIC;
/*
- * $PostgreSQL: pgsql/contrib/spi/timetravel.c,v 1.29 2008/05/17 01:28:22 adunstan Exp $
+ * $PostgreSQL: pgsql/contrib/spi/timetravel.c,v 1.30 2009/01/07 13:44:36 tgl Exp $
*
*
* timetravel.c -- function to get time travel feature
* using general triggers.
+ *
+ * Modified by BÖJTHE Zoltán, Hungary, mailto:urdesobt@axelero.hu
*/
+#include "postgres.h"
-/* Modified by BÖJTHE Zoltán, Hungary, mailto:urdesobt@axelero.hu */
+#include <ctype.h>
-#include "executor/spi.h" /* this is what you need to work with SPI */
-#include "commands/trigger.h" /* -"- and triggers */
-#include "miscadmin.h" /* for GetPgUserName() */
+#include "catalog/pg_type.h"
+#include "commands/trigger.h"
+#include "executor/spi.h"
+#include "miscadmin.h"
+#include "utils/builtins.h"
#include "utils/nabstime.h"
-#include <ctype.h> /* tolower () */
-
-#define ABSTIMEOID 702 /* it should be in pg_type.h */
-
PG_MODULE_MAGIC;
/* AbsoluteTime currabstime(void); */
/*
- * $PostgreSQL: pgsql/contrib/tablefunc/tablefunc.c,v 1.58 2009/01/01 17:23:32 momjian Exp $
+ * $PostgreSQL: pgsql/contrib/tablefunc/tablefunc.c,v 1.59 2009/01/07 13:44:36 tgl Exp $
*
*
* tablefunc
#include <math.h>
+#include "catalog/pg_type.h"
#include "fmgr.h"
#include "funcapi.h"
#include "executor/spi.h"
/*
- * $PostgreSQL: pgsql/contrib/xml2/xpath.c,v 1.21 2008/10/29 00:00:38 tgl Exp $
+ * $PostgreSQL: pgsql/contrib/xml2/xpath.c,v 1.22 2009/01/07 13:44:36 tgl Exp $
*
* Parser interface for DOM-based parser (libxml) rather than
- stream-based SAX-type parser */
-
+ * stream-based SAX-type parser
+ */
#include "postgres.h"
-#include "fmgr.h"
+
#include "executor/spi.h"
+#include "fmgr.h"
#include "funcapi.h"
-#include "miscadmin.h"
#include "lib/stringinfo.h"
+#include "miscadmin.h"
+#include "utils/builtins.h"
/* libxml includes */
/*
- * $PostgreSQL: pgsql/contrib/xml2/xslt_proc.c,v 1.13 2008/05/17 01:28:22 adunstan Exp $
+ * $PostgreSQL: pgsql/contrib/xml2/xslt_proc.c,v 1.14 2009/01/07 13:44:36 tgl Exp $
*
- * XSLT processing functions (requiring libxslt) */
-/* John Gray, for Torchbox 2003-04-01 */
-
+ * XSLT processing functions (requiring libxslt)
+ *
+ * John Gray, for Torchbox 2003-04-01
+ */
#include "postgres.h"
-#include "fmgr.h"
+
#include "executor/spi.h"
+#include "fmgr.h"
#include "funcapi.h"
#include "miscadmin.h"
+#include "utils/builtins.h"
/* libxml includes */
-<!-- $PostgreSQL: pgsql/doc/src/sgml/spi.sgml,v 1.62 2008/04/01 03:09:30 tgl Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/spi.sgml,v 1.63 2009/01/07 13:44:36 tgl Exp $ -->
<chapter id="spi">
<title>Server Programming Interface</title>
</para>
<programlisting>
+#include "postgres.h"
+
#include "executor/spi.h"
+#include "utils/builtins.h"
#ifdef PG_MODULE_MAGIC
PG_MODULE_MAGIC;
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.204 2009/01/02 20:42:00 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.205 2009/01/07 13:44:36 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#include "access/printtup.h"
#include "access/sysattr.h"
+#include "access/xact.h"
#include "catalog/heap.h"
+#include "catalog/pg_type.h"
#include "commands/trigger.h"
+#include "executor/executor.h"
#include "executor/spi_priv.h"
+#include "tcop/pquery.h"
+#include "tcop/utility.h"
+#include "utils/builtins.h"
+#include "utils/datum.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/snapmgr.h"
+#include "utils/syscache.h"
#include "utils/typcache.h"
*
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/backend/utils/adt/ri_triggers.c,v 1.111 2009/01/01 17:23:49 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/ri_triggers.c,v 1.112 2009/01/07 13:44:36 tgl Exp $
*
* ----------
*/
#include "postgres.h"
+#include "access/xact.h"
#include "catalog/pg_constraint.h"
#include "catalog/pg_operator.h"
+#include "catalog/pg_type.h"
#include "commands/trigger.h"
#include "executor/spi.h"
#include "parser/parse_coerce.h"
#include "parser/parse_relation.h"
#include "miscadmin.h"
#include "utils/acl.h"
+#include "utils/builtins.h"
#include "utils/fmgroids.h"
+#include "utils/guc.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/snapmgr.h"
+#include "utils/syscache.h"
#include "utils/tqual.h"
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.294 2009/01/01 17:23:50 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.295 2009/01/07 13:44:36 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#include "catalog/pg_authid.h"
#include "catalog/pg_constraint.h"
#include "catalog/pg_depend.h"
+#include "catalog/pg_language.h"
#include "catalog/pg_opclass.h"
#include "catalog/pg_operator.h"
+#include "catalog/pg_proc.h"
#include "catalog/pg_trigger.h"
+#include "catalog/pg_type.h"
#include "commands/defrem.h"
#include "commands/tablespace.h"
#include "executor/spi.h"
#include "rewrite/rewriteHandler.h"
#include "rewrite/rewriteManip.h"
#include "rewrite/rewriteSupport.h"
+#include "utils/array.h"
+#include "utils/builtins.h"
#include "utils/fmgroids.h"
#include "utils/lsyscache.h"
#include "utils/tqual.h"
+#include "utils/syscache.h"
#include "utils/typcache.h"
#include "utils/xml.h"
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/tsquery_rewrite.c,v 1.13 2009/01/01 17:23:50 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/tsquery_rewrite.c,v 1.14 2009/01/07 13:44:36 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
+#include "catalog/pg_type.h"
#include "executor/spi.h"
+#include "miscadmin.h"
#include "tsearch/ts_type.h"
#include "tsearch/ts_utils.h"
-#include "miscadmin.h"
+#include "utils/builtins.h"
static int
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/tsvector_op.c,v 1.20 2009/01/01 17:23:50 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/tsvector_op.c,v 1.21 2009/01/07 13:44:36 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include "catalog/namespace.h"
+#include "catalog/pg_type.h"
#include "commands/trigger.h"
#include "executor/spi.h"
#include "funcapi.h"
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.82 2009/01/01 17:23:50 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.83 2009/01/07 13:44:37 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#include "utils/datetime.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
+#include "utils/syscache.h"
#include "utils/xml.h"
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/executor/spi.h,v 1.68 2009/01/01 17:23:59 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/executor/spi.h,v 1.69 2009/01/07 13:44:37 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef SPI_H
#define SPI_H
-/*
- * This file may be used by client modules that haven't already
- * included postgres.h
- */
-#include "postgres.h"
-
-/*
- * Most of these are not needed by this file, but may be used by
- * user-written code that uses SPI
- */
-#include "access/heapam.h"
-#include "access/xact.h"
-#include "catalog/pg_language.h"
-#include "catalog/pg_proc.h"
-#include "catalog/pg_type.h"
-#include "executor/execdefs.h"
-#include "executor/executor.h"
-#include "nodes/execnodes.h"
-#include "nodes/params.h"
#include "nodes/parsenodes.h"
-#include "nodes/plannodes.h"
-#include "nodes/primnodes.h"
-#include "nodes/relation.h"
-#include "tcop/dest.h"
-#include "tcop/pquery.h"
-#include "tcop/tcopprot.h"
-#include "tcop/utility.h"
-#include "utils/builtins.h"
-#include "utils/datum.h"
#include "utils/portal.h"
-#include "utils/syscache.h"
+#include "utils/relcache.h"
+#include "utils/snapshot.h"
typedef struct SPITupleTable
/**********************************************************************
* plperl.c - perl as a procedural language for PostgreSQL
*
- * $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.143 2008/12/11 07:34:09 petere Exp $
+ * $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.144 2009/01/07 13:44:37 tgl Exp $
*
**********************************************************************/
#include <locale.h>
/* postgreSQL stuff */
+#include "access/xact.h"
+#include "catalog/pg_language.h"
+#include "catalog/pg_proc.h"
+#include "catalog/pg_type.h"
#include "commands/trigger.h"
#include "executor/spi.h"
#include "funcapi.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "parser/parse_type.h"
+#include "utils/builtins.h"
#include "utils/fmgroids.h"
#include "utils/guc.h"
+#include "utils/hsearch.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
+#include "utils/syscache.h"
#include "utils/typcache.h"
-#include "utils/hsearch.h"
/* define our text domain for translations */
#undef TEXTDOMAIN
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.118 2009/01/01 17:24:03 momjian Exp $
+ * $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.119 2009/01/07 13:44:37 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#include "plpgsql.h"
+#include "catalog/pg_type.h"
#include "parser/parser.h"
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.226 2009/01/01 17:24:03 momjian Exp $
+ * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.227 2009/01/07 13:44:37 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#include "tcop/tcopprot.h"
#include "utils/array.h"
#include "utils/builtins.h"
+#include "utils/datum.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/snapmgr.h"
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/pl/plpgsql/src/plpgsql.h,v 1.107 2009/01/01 17:24:04 momjian Exp $
+ * $PostgreSQL: pgsql/src/pl/plpgsql/src/plpgsql.h,v 1.108 2009/01/07 13:44:37 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
+#include "access/xact.h"
#include "fmgr.h"
#include "miscadmin.h"
#include "commands/trigger.h"
* pltcl.c - PostgreSQL support for Tcl as
* procedural language (PL)
*
- * $PostgreSQL: pgsql/src/pl/tcl/pltcl.c,v 1.124 2008/12/11 07:34:09 petere Exp $
+ * $PostgreSQL: pgsql/src/pl/tcl/pltcl.c,v 1.125 2009/01/07 13:44:37 tgl Exp $
*
**********************************************************************/
#define CONST84
#endif
+#include "access/xact.h"
#include "catalog/pg_language.h"
#include "catalog/pg_proc.h"
+#include "catalog/pg_type.h"
#include "commands/trigger.h"
#include "executor/spi.h"
#include "fmgr.h"
#include "utils/syscache.h"
#include "utils/typcache.h"
+
#define HAVE_TCL_VERSION(maj,min) \
((TCL_MAJOR_VERSION > maj) || \
(TCL_MAJOR_VERSION == maj && TCL_MINOR_VERSION >= min))
/*
- * $PostgreSQL: pgsql/src/test/regress/regress.c,v 1.71 2008/03/25 22:42:46 tgl Exp $
+ * $PostgreSQL: pgsql/src/test/regress/regress.c,v 1.72 2009/01/07 13:44:37 tgl Exp $
*/
#include "postgres.h"
-#include <float.h> /* faked on sunos */
+#include <float.h>
+#include <math.h>
#include "access/transam.h"
-#include "utils/geo_decls.h" /* includes <math.h> */
-#include "executor/executor.h" /* For GetAttributeByName */
-#include "commands/sequence.h" /* for nextval() */
+#include "access/xact.h"
+#include "catalog/pg_type.h"
+#include "commands/sequence.h"
+#include "commands/trigger.h"
+#include "executor/executor.h"
+#include "executor/spi.h"
+#include "utils/builtins.h"
+#include "utils/geo_decls.h"
+
#define P_MAXDIG 12
#define LDELIM '('
return n + len;
}
-#include "executor/spi.h" /* this is what you need to work with SPI */
-#include "commands/trigger.h" /* -"- and triggers */
static TransactionId fd17b_xid = InvalidTransactionId;
static TransactionId fd17a_xid = InvalidTransactionId;