Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6df6d8e

Browse files
author
Neil Conway
committed
Fixes for RESET SESSION patch, per Alvaro. Fix a typo in the RESET
ref page (sorry, my fault!), and simplify the coding ofResetTempTableNamespace().
1 parentc0e42e9 commit6df6d8e

File tree

3 files changed

+9
-20
lines changed

3 files changed

+9
-20
lines changed

‎doc/src/sgml/ref/reset.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/reset.sgml,v 1.33 2007/04/1206:53:46 neilc Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/reset.sgml,v 1.34 2007/04/1222:34:45 neilc Exp $
33
PostgreSQL documentation
44
-->
55

@@ -42,7 +42,7 @@ SET <replaceable class="parameter">configuration_parameter</replaceable> TO DEFA
4242

4343
<para>
4444
The default value is defined as the value that the parameter would
45-
have had, if no <command>SET</> ever been issued for it in the
45+
have had, if no <command>SET</>hadever been issued for it in the
4646
current session. The actual source of this value might be a
4747
compiled-in default, the configuration file, command-line options,
4848
or per-database or per-user default settings. See <xref
@@ -112,15 +112,15 @@ SET <replaceable class="parameter">configuration_parameter</replaceable> TO DEFA
112112
Releases all temporary resources associated with the current
113113
session. This has the same effect as executing the following
114114
command sequence:
115-
<synopsis>
115+
<programlisting>
116116
SET SESSION AUTHORIZATION DEFAULT;
117117
RESET ALL;
118118
DEALLOCATE ALL;
119119
CLOSE ALL;
120120
UNLISTEN *;
121121
RESET PLANS;
122122
RESET TEMP;
123-
</synopsis>
123+
</programlisting>
124124
</para>
125125
</listitem>
126126
</varlistentry>

‎src/backend/catalog/namespace.c

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Portions Copyright (c) 1994, Regents of the University of California
1414
*
1515
* IDENTIFICATION
16-
* $PostgreSQL: pgsql/src/backend/catalog/namespace.c,v 1.94 2007/04/1206:53:46 neilc Exp $
16+
* $PostgreSQL: pgsql/src/backend/catalog/namespace.c,v 1.95 2007/04/1222:34:45 neilc Exp $
1717
*
1818
*-------------------------------------------------------------------------
1919
*/
@@ -1946,18 +1946,8 @@ InitTempTableNamespace(void)
19461946
void
19471947
ResetTempTableNamespace(void)
19481948
{
1949-
charnamespaceName[NAMEDATALEN];
1950-
OidnamespaceId;
1951-
1952-
/* find oid */
1953-
snprintf(namespaceName,sizeof(namespaceName),"pg_temp_%d",MyBackendId);
1954-
namespaceId=GetSysCacheOid(NAMESPACENAME,
1955-
CStringGetDatum(namespaceName),
1956-
0,0,0);
1957-
1958-
/* clean if exists */
1959-
if (OidIsValid(namespaceId))
1960-
RemoveTempRelations(namespaceId);
1949+
if (OidIsValid(myTempNamespace))
1950+
RemoveTempRelations(myTempNamespace);
19611951
}
19621952

19631953
/*

‎src/include/catalog/namespace.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/include/catalog/namespace.h,v 1.46 2007/04/1206:53:48 neilc Exp $
10+
* $PostgreSQL: pgsql/src/include/catalog/namespace.h,v 1.47 2007/04/1222:34:45 neilc Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -81,6 +81,7 @@ extern char *NameListToQuotedString(List *names);
8181
externboolisTempNamespace(OidnamespaceId);
8282
externboolisAnyTempNamespace(OidnamespaceId);
8383
externboolisOtherTempNamespace(OidnamespaceId);
84+
externvoidResetTempTableNamespace(void);
8485

8586
externOverrideSearchPath*GetOverrideSearchPath(MemoryContextcontext);
8687
externvoidPushOverrideSearchPath(OverrideSearchPath*newpath);
@@ -100,6 +101,4 @@ extern char *namespace_search_path;
100101

101102
externList*fetch_search_path(boolincludeImplicit);
102103

103-
externvoidResetTempTableNamespace(void);
104-
105104
#endif/* NAMESPACE_H */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp