Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
96c102fe
Commit
96c102fe
authored
Dec 18, 2009
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Install server-side language PL/pgSQL by default.
parent
be3a24de
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
12 deletions
+44
-12
doc/src/sgml/installation.sgml
doc/src/sgml/installation.sgml
+5
-5
src/bin/initdb/initdb.c
src/bin/initdb/initdb.c
+29
-1
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.c
+8
-4
src/test/regress/GNUmakefile
src/test/regress/GNUmakefile
+2
-2
No files found.
doc/src/sgml/installation.sgml
View file @
96c102fe
<
!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.33
3 2009/12/15 22:59:53 petere
Exp $ -->
<
!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.33
4 2009/12/18 21:28:42 momjian
Exp $ -->
<
chapter
id
=
"installation"
>
<
chapter
id
=
"installation"
>
<
title
><
![%standalone-include[<productname>PostgreSQL</>]]>
<
title
><
![%standalone-include[<productname>PostgreSQL</>]]>
...
@@ -2266,14 +2266,14 @@ hosts=local4,bind4
...
@@ -2266,14 +2266,14 @@ hosts=local4,bind4
is
<
command
>
createlang
</
command
>
failing
with
unusual
errors
.
is
<
command
>
createlang
</
command
>
failing
with
unusual
errors
.
For
example
,
running
as
the
owner
of
the
PostgreSQL
installation
:
For
example
,
running
as
the
owner
of
the
PostgreSQL
installation
:
<
screen
>
<
screen
>
-
bash
-
3.00
$
createlang
plp
gsq
l
template1
-
bash
-
3.00
$
createlang
plp
er
l
template1
createlang
:
language
installation
failed
:
ERROR
:
could
not
load
library
"/opt/dbs/pgsql748/lib/plp
gsq
l.so"
:
A
memory
address
is
not
in
the
address
space
for
the
process
.
createlang
:
language
installation
failed
:
ERROR
:
could
not
load
library
"/opt/dbs/pgsql748/lib/plp
er
l.so"
:
A
memory
address
is
not
in
the
address
space
for
the
process
.
</
screen
>
</
screen
>
Running
as
a
non
-
owner
in
the
group
posessing
the
PostgreSQL
Running
as
a
non
-
owner
in
the
group
posessing
the
PostgreSQL
installation
:
installation
:
<
screen
>
<
screen
>
-
bash
-
3.00
$
createlang
plp
gsq
l
template1
-
bash
-
3.00
$
createlang
plp
er
l
template1
createlang
:
language
installation
failed
:
ERROR
:
could
not
load
library
"/opt/dbs/pgsql748/lib/plp
gsq
l.so"
:
Bad
address
createlang
:
language
installation
failed
:
ERROR
:
could
not
load
library
"/opt/dbs/pgsql748/lib/plp
er
l.so"
:
Bad
address
</
screen
>
</
screen
>
Another
example
is
out
of
memory
errors
in
the
PostgreSQL
server
Another
example
is
out
of
memory
errors
in
the
PostgreSQL
server
logs
,
with
every
memory
allocation
near
or
greater
than
256
MB
logs
,
with
every
memory
allocation
near
or
greater
than
256
MB
...
...
src/bin/initdb/initdb.c
View file @
96c102fe
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
* Portions taken from FreeBSD.
* Portions taken from FreeBSD.
*
*
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.1
79 2009/12/18 18:45:50 tgl
Exp $
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.1
80 2009/12/18 21:28:42 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -176,6 +176,7 @@ static void setup_dictionary(void);
...
@@ -176,6 +176,7 @@ static void setup_dictionary(void);
static
void
setup_privileges
(
void
);
static
void
setup_privileges
(
void
);
static
void
set_info_version
(
void
);
static
void
set_info_version
(
void
);
static
void
setup_schema
(
void
);
static
void
setup_schema
(
void
);
static
void
load_plpgsql
(
void
);
static
void
vacuum_db
(
void
);
static
void
vacuum_db
(
void
);
static
void
make_template0
(
void
);
static
void
make_template0
(
void
);
static
void
make_postgres
(
void
);
static
void
make_postgres
(
void
);
...
@@ -1893,6 +1894,31 @@ setup_schema(void)
...
@@ -1893,6 +1894,31 @@ setup_schema(void)
check_ok
();
check_ok
();
}
}
/*
* load PL/pgsql server-side language
*/
static
void
load_plpgsql
(
void
)
{
PG_CMD_DECL
;
fputs
(
_
(
"loading PL/pgSQL server-side language ... "
),
stdout
);
fflush
(
stdout
);
snprintf
(
cmd
,
sizeof
(
cmd
),
"
\"
%s
\"
%s template1 >%s"
,
backend_exec
,
backend_options
,
DEVNULL
);
PG_CMD_OPEN
;
PG_CMD_PUTS
(
"CREATE LANGUAGE plpgsql;
\n
"
);
PG_CMD_CLOSE
;
check_ok
();
}
/*
/*
* clean everything up in template1
* clean everything up in template1
*/
*/
...
@@ -3134,6 +3160,8 @@ main(int argc, char *argv[])
...
@@ -3134,6 +3160,8 @@ main(int argc, char *argv[])
setup_schema
();
setup_schema
();
load_plpgsql
();
vacuum_db
();
vacuum_db
();
make_template0
();
make_template0
();
...
...
src/bin/pg_dump/pg_dump.c
View file @
96c102fe
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
* by PostgreSQL
* by PostgreSQL
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.55
6 2009/12/14 00:39:11 itagaki
Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.55
7 2009/12/18 21:28:42 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
#include "access/attnum.h"
#include "access/attnum.h"
#include "access/sysattr.h"
#include "access/sysattr.h"
#include "access/transam.h"
#include "catalog/pg_cast.h"
#include "catalog/pg_cast.h"
#include "catalog/pg_class.h"
#include "catalog/pg_class.h"
#include "catalog/pg_default_acl.h"
#include "catalog/pg_default_acl.h"
...
@@ -4599,8 +4600,10 @@ getProcLangs(int *numProcLangs)
...
@@ -4599,8 +4600,10 @@ getProcLangs(int *numProcLangs)
"(%s lanowner) AS lanowner "
"(%s lanowner) AS lanowner "
"FROM pg_language "
"FROM pg_language "
"WHERE lanispl "
"WHERE lanispl "
/* do not dump initdb-installed languages */
"AND oid >= %u "
"ORDER BY oid"
,
"ORDER BY oid"
,
username_subquery
);
username_subquery
,
FirstNormalObjectId
);
}
}
else
if
(
g_fout
->
remoteVersion
>=
80300
)
else
if
(
g_fout
->
remoteVersion
>=
80300
)
{
{
...
@@ -4610,9 +4613,10 @@ getProcLangs(int *numProcLangs)
...
@@ -4610,9 +4613,10 @@ getProcLangs(int *numProcLangs)
"lanvalidator, lanacl, "
"lanvalidator, lanacl, "
"(%s lanowner) AS lanowner "
"(%s lanowner) AS lanowner "
"FROM pg_language "
"FROM pg_language "
"WHERE lanispl
"
"WHERE lanispl
%s
"
"ORDER BY oid"
,
"ORDER BY oid"
,
username_subquery
);
username_subquery
,
binary_upgrade
?
"
\n
AND lanname != 'plpgsql'"
:
""
);
}
}
else
if
(
g_fout
->
remoteVersion
>=
80100
)
else
if
(
g_fout
->
remoteVersion
>=
80100
)
{
{
...
...
src/test/regress/GNUmakefile
View file @
96c102fe
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
# Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
# Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
# Portions Copyright (c) 1994, Regents of the University of California
#
#
# $PostgreSQL: pgsql/src/test/regress/GNUmakefile,v 1.
79 2009/10/26 21:11:22 petere
Exp $
# $PostgreSQL: pgsql/src/test/regress/GNUmakefile,v 1.
80 2009/12/18 21:28:42 momjian
Exp $
#
#
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
...
@@ -138,7 +138,7 @@ tablespace-setup:
...
@@ -138,7 +138,7 @@ tablespace-setup:
## Run tests
## Run tests
##
##
pg_regress_call
=
./pg_regress
--inputdir
=
$(srcdir)
--dlpath
=
.
--multibyte
=
$(MULTIBYTE)
--load-language
=
plpgsql
$(NOLOCALE)
pg_regress_call
=
./pg_regress
--inputdir
=
$(srcdir)
--dlpath
=
.
--multibyte
=
$(MULTIBYTE)
$(NOLOCALE)
check
:
all
check
:
all
$(pg_regress_call)
--temp-install
=
./tmp_check
--top-builddir
=
$(top_builddir)
--schedule
=
$(srcdir)
/parallel_schedule
$(MAXCONNOPT)
$(TEMP_CONF)
$(pg_regress_call)
--temp-install
=
./tmp_check
--top-builddir
=
$(top_builddir)
--schedule
=
$(srcdir)
/parallel_schedule
$(MAXCONNOPT)
$(TEMP_CONF)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment