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

Commiteb1ad5b

Browse files
committed
Patch for current_schemas to optionally include implicit ...
Second cut attached. This one just adds a boolean option to the existingfunction to indicate that implicit schemas are to be included (or not).I remembered the docs as well this time :-)Dave Page
1 parent79ff2e9 commiteb1ad5b

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

‎doc/src/sgml/func.sgml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.102 2002/06/1502:59:55 thomas Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.103 2002/06/1520:03:51 momjian Exp $
33
PostgreSQL documentation
44
-->
55

@@ -4323,9 +4323,9 @@ SELECT NULLIF(value, '(none)') ...
43234323
<entry>name of current schema</entry>
43244324
</row>
43254325
<row>
4326-
<entry><function>current_schemas()</function></entry>
4326+
<entry><function>current_schemas(boolean)</function></entry>
43274327
<entry><type>name[]</type></entry>
4328-
<entry>names of schemas in search path</entry>
4328+
<entry>names of schemas in search path optionally including implicit schemas</entry>
43294329
</row>
43304330
</tbody>
43314331
</tgroup>
@@ -4378,10 +4378,10 @@ SELECT NULLIF(value, '(none)') ...
43784378
at the front of the search path (or NULL if the search path is
43794379
empty). This is the schema that will be used for any tables or
43804380
other named objects that are created without specifying a target schema.
4381-
<function>current_schemas</function> returns an array of the names of all
4382-
schemas presently in the search path.Note that these functions show
4383-
only schemas that are explicitly part of the path; when a system schema
4384-
is being searched implicitly, it is not listed.
4381+
<function>current_schemas(boolean)</function> returns an array of the names of all
4382+
schemas presently in the search path.The boolean option determines whether or not
4383+
implicitly included system schemas such as pg_catalog are included in the search
4384+
path returned.
43854385
</para>
43864386

43874387
<table>

‎src/backend/utils/adt/name.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*
1313
*
1414
* IDENTIFICATION
15-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.37 2002/06/13 06:19:45 ishii Exp $
15+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.38 2002/06/15 20:03:51 momjian Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -251,7 +251,7 @@ current_schema(PG_FUNCTION_ARGS)
251251
Datum
252252
current_schemas(PG_FUNCTION_ARGS)
253253
{
254-
List*search_path=fetch_search_path(false);
254+
List*search_path=fetch_search_path(PG_GETARG_BOOL(0));
255255
intnnames=length(search_path);
256256
Datum*names;
257257
inti;

‎src/include/catalog/catversion.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
3838
* Portions Copyright (c) 1994, Regents of the University of California
3939
*
40-
* $Id: catversion.h,v 1.134 2002/06/11 15:44:38 thomas Exp $
40+
* $Id: catversion.h,v 1.135 2002/06/15 20:03:51 momjian Exp $
4141
*
4242
*-------------------------------------------------------------------------
4343
*/
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/*yyyymmddN */
56-
#defineCATALOG_VERSION_NO200206111
56+
#defineCATALOG_VERSION_NO200206151
5757

5858
#endif

‎src/include/catalog/pg_proc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: pg_proc.h,v 1.241 2002/06/11 15:41:37 thomas Exp $
10+
* $Id: pg_proc.h,v 1.242 2002/06/15 20:03:51 momjian Exp $
1111
*
1212
* NOTES
1313
* The script catalog/genbki.sh reads this file and generates .bki
@@ -1761,7 +1761,7 @@ DESCR("convert name to varchar");
17611761

17621762
DATA(insertOID=1402 (current_schemaPGNSPPGUID12ffftfs019"0"10000100current_schema-_null_ ));
17631763
DESCR("current schema name");
1764-
DATA(insertOID=1403 (current_schemasPGNSPPGUID12ffftfs01003"0"10000100current_schemas-_null_ ));
1764+
DATA(insertOID=1403 (current_schemasPGNSPPGUID12ffftfs11003"16"10000100current_schemas-_null_ ));
17651765
DESCR("current schema search list");
17661766

17671767
DATA(insertOID=1404 (overlayPGNSPPGUID14ffftfi425"25 25 23 23"10000100"select substring($1, 1, ($3 - 1)) || $2 || substring($1, ($3 + $4))"-_null_ ));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp