Skip to content

Commit 8dec0c1

Browse files
committed
lease find enclosed a patch that matches the PL/Perl documentation
(fairly closely, I hope) to the current PL/Perl implementation. David Fetter
1 parent 8399756 commit 8dec0c1

File tree

15 files changed

+507
-114
lines changed

15 files changed

+507
-114
lines changed

doc/src/sgml/plperl.sgml

Lines changed: 258 additions & 64 deletions
Large diffs are not rendered by default.

src/backend/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $PostgreSQL: pgsql/src/backend/Makefile,v 1.101 2004/07/19 17:03:56 tgl Exp $
7+
# $PostgreSQL: pgsql/src/backend/Makefile,v 1.102 2004/07/21 20:22:58 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -29,13 +29,13 @@ endif
2929

3030
##########################################################################
3131

32-
all: submake-libpgport postgres $(POSTGRES_IMP)
32+
all: submake-libpgport submake-libpq postgres $(POSTGRES_IMP)
3333

3434
ifneq ($(PORTNAME), cygwin)
3535
ifneq ($(PORTNAME), win32)
3636

3737
postgres: $(OBJS)
38-
$(CC) $(CFLAGS) $(LDFLAGS) $(export_dynamic) $^ $(LIBS) -o $@
38+
$(CC) $(CFLAGS) $(LDFLAGS) -I $(libpq_srcdir) $(export_dynamic) $^ $(LIBS) $(libpq) -o $@
3939

4040
endif
4141
endif

src/backend/bootstrap/bootstrap.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.187 2004/07/17 03:28:37 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.188 2004/07/21 20:22:58 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -34,6 +34,7 @@
3434
#include "libpq/pqsignal.h"
3535
#include "miscadmin.h"
3636
#include "postmaster/bgwriter.h"
37+
#include "postmaster/pg_autovacuum.h"
3738
#include "storage/freespace.h"
3839
#include "storage/ipc.h"
3940
#include "storage/pg_shmem.h"
@@ -355,6 +356,9 @@ BootstrapMain(int argc, char *argv[])
355356
case BS_XLOG_BGWRITER:
356357
statmsg = "writer process";
357358
break;
359+
case BS_XLOG_AUTOVAC:
360+
statmsg = "auto vacuum process";
361+
break;
358362
default:
359363
statmsg = "??? process";
360364
break;
@@ -391,6 +395,9 @@ BootstrapMain(int argc, char *argv[])
391395
case BS_XLOG_BGWRITER:
392396
InitDummyProcess(DUMMY_PROC_BGWRITER);
393397
break;
398+
case BS_XLOG_AUTOVAC:
399+
InitDummyProcess(DUMMY_PROC_AUTOVAC);
400+
break;
394401

395402
default:
396403
InitDummyProcess(DUMMY_PROC_DEFAULT);
@@ -427,6 +434,12 @@ BootstrapMain(int argc, char *argv[])
427434
BackgroundWriterMain();
428435
proc_exit(1); /* should never return */
429436

437+
case BS_XLOG_AUTOVAC:
438+
/* don't set signals, autovac has its own agenda */
439+
InitXLOGAccess();
440+
AutoVacMain();
441+
proc_exit(1); /* should never return */
442+
430443
default:
431444
elog(PANIC, "unrecognized XLOG op: %d", xlogop);
432445
proc_exit(1);

src/backend/catalog/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Makefile for backend/catalog
44
#
5-
# $PostgreSQL: pgsql/src/backend/catalog/Makefile,v 1.51 2004/06/18 06:13:19 tgl Exp $
5+
# $PostgreSQL: pgsql/src/backend/catalog/Makefile,v 1.52 2004/07/21 20:22:59 momjian Exp $
66
#
77
#-------------------------------------------------------------------------
88

@@ -32,7 +32,7 @@ POSTGRES_BKI_SRCS := $(addprefix $(top_srcdir)/src/include/catalog/,\
3232
pg_language.h pg_largeobject.h pg_aggregate.h pg_statistic.h \
3333
pg_rewrite.h pg_trigger.h pg_listener.h pg_description.h pg_cast.h \
3434
pg_namespace.h pg_conversion.h pg_database.h pg_shadow.h pg_group.h \
35-
pg_tablespace.h pg_depend.h indexing.h \
35+
pg_tablespace.h pg_depend.h pg_autovacuum.h indexing.h \
3636
)
3737

3838
pg_includes := $(sort -I$(top_srcdir)/src/include -I$(top_builddir)/src/include)

src/backend/catalog/system_views.sql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 1996-2003, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/backend/catalog/system_views.sql,v 1.6 2004/04/26 15:24:41 momjian Exp $
6+
* $PostgreSQL: pgsql/src/backend/catalog/system_views.sql,v 1.7 2004/07/21 20:22:59 momjian Exp $
77
*/
88

99
CREATE VIEW pg_user AS
@@ -41,22 +41,26 @@ CREATE VIEW pg_tables AS
4141
SELECT
4242
N.nspname AS schemaname,
4343
C.relname AS tablename,
44+
T.spcname AS tablespace,
4445
pg_get_userbyid(C.relowner) AS tableowner,
4546
C.relhasindex AS hasindexes,
4647
C.relhasrules AS hasrules,
4748
(C.reltriggers > 0) AS hastriggers
4849
FROM pg_class C LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
50+
LEFT JOIN pg_tablespace T ON (T.oid = C.reltablespace)
4951
WHERE C.relkind = 'r';
5052

5153
CREATE VIEW pg_indexes AS
5254
SELECT
5355
N.nspname AS schemaname,
5456
C.relname AS tablename,
57+
T.spcname AS tablespace,
5558
I.relname AS indexname,
5659
pg_get_indexdef(I.oid) AS indexdef
5760
FROM pg_index X JOIN pg_class C ON (C.oid = X.indrelid)
5861
JOIN pg_class I ON (I.oid = X.indexrelid)
5962
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
63+
LEFT JOIN pg_tablespace T ON (T.oid = C.reltablespace)
6064
WHERE C.relkind = 'r' AND I.relkind = 'i';
6165

6266
CREATE VIEW pg_stats AS

src/backend/postmaster/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
# Makefile for src/backend/postmaster
55
#
66
# IDENTIFICATION
7-
# $PostgreSQL: pgsql/src/backend/postmaster/Makefile,v 1.16 2004/07/19 02:47:08 tgl Exp $
7+
# $PostgreSQL: pgsql/src/backend/postmaster/Makefile,v 1.17 2004/07/21 20:22:59 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

1111
subdir = src/backend/postmaster
1212
top_builddir = ../../..
1313
include $(top_builddir)/src/Makefile.global
1414

15-
OBJS = postmaster.o bgwriter.o pgstat.o pgarch.o
15+
OBJS = postmaster.o bgwriter.o pgstat.o pgarch.o pg_autovacuum.o
1616

1717
all: SUBSYS.o
1818

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy