File tree Expand file tree Collapse file tree 22 files changed +118
-86
lines changed Expand file tree Collapse file tree 22 files changed +118
-86
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * $PostgreSQL: pgsql/contrib/spi/autoinc.c,v 1.15 2008/05/17 01:28:22 adunstan Exp $
2
+ * $PostgreSQL: pgsql/contrib/spi/autoinc.c,v 1.16 2009/01/07 13:44:36 tgl Exp $
3
3
*/
4
+ #include "postgres.h"
4
5
5
- #include "executor/spi.h" /* this is what you need to work with SPI */
6
- #include "commands/trigger.h" /* -"- and triggers */
7
- #include "commands/sequence.h" /* for nextval() */
6
+ #include "catalog/pg_type.h"
7
+ #include "commands/sequence.h"
8
+ #include "commands/trigger.h"
9
+ #include "executor/spi.h"
10
+ #include "utils/builtins.h"
8
11
9
12
PG_MODULE_MAGIC ;
10
13
Original file line number Diff line number Diff line change 1
1
/*
2
2
* insert_username.c
3
3
* $Modified: Thu Oct 16 08:13:42 1997 by brook $
4
- * $PostgreSQL: pgsql/contrib/spi/insert_username.c,v 1.16 2008/03/25 22:42:42 tgl Exp $
4
+ * $PostgreSQL: pgsql/contrib/spi/insert_username.c,v 1.17 2009/01/07 13:44:36 tgl Exp $
5
5
*
6
6
* insert user name in response to a trigger
7
7
* usage: insert_username (column_name)
8
8
*/
9
+ #include "postgres.h"
9
10
10
- #include "executor/spi.h" /* this is what you need to work with SPI */
11
- #include "commands/trigger.h" /* -"- and triggers */
12
- #include "miscadmin.h" /* for GetUserName() */
11
+ #include "catalog/pg_type.h"
12
+ #include "commands/trigger.h"
13
+ #include "executor/spi.h"
14
+ #include "miscadmin.h"
15
+ #include "utils/builtins.h"
13
16
14
17
PG_MODULE_MAGIC ;
15
18
Original file line number Diff line number Diff line change 1
1
/*
2
2
moddatetime.c
3
3
4
- $PostgreSQL: pgsql/contrib/spi/moddatetime.c,v 1.14 2007/02/01 19:10:23 momjian Exp $
4
+ $PostgreSQL: pgsql/contrib/spi/moddatetime.c,v 1.15 2009/01/07 13:44:36 tgl Exp $
5
5
6
6
What is this?
7
7
It is a function to be called from a trigger for the purpose of updating
@@ -13,9 +13,11 @@ not really know what I am doing. I also had help from
13
13
Jan Wieck <jwieck@debis.com> who told me about the timestamp_in("now") function.
14
14
OH, me, I'm Terry Mackintosh <terry@terrym.com>
15
15
*/
16
+ #include "postgres.h"
16
17
17
- #include "executor/spi.h" /* this is what you need to work with SPI */
18
- #include "commands/trigger.h" /* -"- and triggers */
18
+ #include "catalog/pg_type.h"
19
+ #include "executor/spi.h"
20
+ #include "commands/trigger.h"
19
21
20
22
PG_MODULE_MAGIC ;
21
23
Original file line number Diff line number Diff line change 1
1
/*
2
- * $PostgreSQL: pgsql/contrib/spi/refint.c,v 1.33 2008/05/17 01:28:22 adunstan Exp $
2
+ * $PostgreSQL: pgsql/contrib/spi/refint.c,v 1.34 2009/01/07 13:44:36 tgl Exp $
3
3
*
4
4
*
5
5
* refint.c -- set of functions to define referential integrity
6
6
* constraints using general triggers.
7
7
*/
8
+ #include "postgres.h"
8
9
9
- #include "executor/spi.h" /* this is what you need to work with SPI */
10
-
11
- #include "commands/trigger.h" /* -"- and triggers */
12
10
#include <ctype.h>
13
11
12
+ #include "commands/trigger.h"
13
+ #include "executor/spi.h"
14
+ #include "utils/builtins.h"
14
15
15
16
PG_MODULE_MAGIC ;
16
17
Original file line number Diff line number Diff line change 1
1
/*
2
- * $PostgreSQL: pgsql/contrib/spi/timetravel.c,v 1.29 2008/05/17 01:28:22 adunstan Exp $
2
+ * $PostgreSQL: pgsql/contrib/spi/timetravel.c,v 1.30 2009/01/07 13:44:36 tgl Exp $
3
3
*
4
4
*
5
5
* timetravel.c -- function to get time travel feature
6
6
* using general triggers.
7
+ *
8
+ * Modified by BÖJTHE Zoltán, Hungary, mailto:urdesobt@axelero.hu
7
9
*/
10
+ #include "postgres.h"
8
11
9
- /* Modified by BÖJTHE Zoltán, Hungary, mailto:urdesobt@axelero.hu */
12
+ #include <ctype.h>
10
13
11
- #include "executor/spi.h" /* this is what you need to work with SPI */
12
- #include "commands/trigger.h" /* -"- and triggers */
13
- #include "miscadmin.h" /* for GetPgUserName() */
14
+ #include "catalog/pg_type.h"
15
+ #include "commands/trigger.h"
16
+ #include "executor/spi.h"
17
+ #include "miscadmin.h"
18
+ #include "utils/builtins.h"
14
19
#include "utils/nabstime.h"
15
20
16
- #include <ctype.h> /* tolower () */
17
-
18
- #define ABSTIMEOID 702 /* it should be in pg_type.h */
19
-
20
21
PG_MODULE_MAGIC ;
21
22
22
23
/* AbsoluteTime currabstime(void); */
Original file line number Diff line number Diff line change 1
1
/*
2
- * $PostgreSQL: pgsql/contrib/tablefunc/tablefunc.c,v 1.58 2009/01/01 17:23:32 momjian Exp $
2
+ * $PostgreSQL: pgsql/contrib/tablefunc/tablefunc.c,v 1.59 2009/01/07 13:44:36 tgl Exp $
3
3
*
4
4
*
5
5
* tablefunc
34
34
35
35
#include <math.h>
36
36
37
+ #include "catalog/pg_type.h"
37
38
#include "fmgr.h"
38
39
#include "funcapi.h"
39
40
#include "executor/spi.h"
Original file line number Diff line number Diff line change 1
1
/*
2
- * $PostgreSQL: pgsql/contrib/xml2/xpath.c,v 1.21 2008/10/29 00:00:38 tgl Exp $
2
+ * $PostgreSQL: pgsql/contrib/xml2/xpath.c,v 1.22 2009/01/07 13:44:36 tgl Exp $
3
3
*
4
4
* Parser interface for DOM-based parser (libxml) rather than
5
- stream-based SAX-type parser */
6
-
5
+ * stream-based SAX-type parser
6
+ */
7
7
#include "postgres.h"
8
- #include "fmgr.h"
8
+
9
9
#include "executor/spi.h"
10
+ #include "fmgr.h"
10
11
#include "funcapi.h"
11
- #include "miscadmin.h"
12
12
#include "lib/stringinfo.h"
13
+ #include "miscadmin.h"
14
+ #include "utils/builtins.h"
13
15
14
16
/* libxml includes */
15
17
Original file line number Diff line number Diff line change 1
1
/*
2
- * $PostgreSQL: pgsql/contrib/xml2/xslt_proc.c,v 1.13 2008/05/17 01:28:22 adunstan Exp $
2
+ * $PostgreSQL: pgsql/contrib/xml2/xslt_proc.c,v 1.14 2009/01/07 13:44:36 tgl Exp $
3
3
*
4
- * XSLT processing functions (requiring libxslt) */
5
- /* John Gray, for Torchbox 2003-04-01 */
6
-
4
+ * XSLT processing functions (requiring libxslt)
5
+ *
6
+ * John Gray, for Torchbox 2003-04-01
7
+ */
7
8
#include "postgres.h"
8
- #include "fmgr.h"
9
+
9
10
#include "executor/spi.h"
11
+ #include "fmgr.h"
10
12
#include "funcapi.h"
11
13
#include "miscadmin.h"
14
+ #include "utils/builtins.h"
12
15
13
16
/* libxml includes */
14
17
Original file line number Diff line number Diff line change 1
- <!-- $PostgreSQL: pgsql/doc/src/sgml/spi.sgml,v 1.62 2008/04/01 03:09:30 tgl Exp $ -->
1
+ <!-- $PostgreSQL: pgsql/doc/src/sgml/spi.sgml,v 1.63 2009/01/07 13:44:36 tgl Exp $ -->
2
2
3
3
<chapter id="spi">
4
4
<title>Server Programming Interface</title>
@@ -3617,7 +3617,10 @@ INSERT INTO a SELECT * FROM a;
3617
3617
</para>
3618
3618
3619
3619
<programlisting>
3620
+ #include "postgres.h"
3621
+
3620
3622
#include "executor/spi.h"
3623
+ #include "utils/builtins.h"
3621
3624
3622
3625
#ifdef PG_MODULE_MAGIC
3623
3626
PG_MODULE_MAGIC;
Original file line number Diff line number Diff line change 8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.204 2009/01/02 20:42:00 tgl Exp $
11
+ * $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.205 2009/01/07 13:44:36 tgl Exp $
12
12
*
13
13
*-------------------------------------------------------------------------
14
14
*/
15
15
#include "postgres.h"
16
16
17
17
#include "access/printtup.h"
18
18
#include "access/sysattr.h"
19
+ #include "access/xact.h"
19
20
#include "catalog/heap.h"
21
+ #include "catalog/pg_type.h"
20
22
#include "commands/trigger.h"
23
+ #include "executor/executor.h"
21
24
#include "executor/spi_priv.h"
25
+ #include "tcop/pquery.h"
26
+ #include "tcop/utility.h"
27
+ #include "utils/builtins.h"
28
+ #include "utils/datum.h"
22
29
#include "utils/lsyscache.h"
23
30
#include "utils/memutils.h"
24
31
#include "utils/snapmgr.h"
32
+ #include "utils/syscache.h"
25
33
#include "utils/typcache.h"
26
34
27
35
You can’t perform that action at this time.
0 commit comments