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

Commit9226acb

Browse files
committed
pathman_partition_list view added to migration script
1 parentb061957 commit9226acb

File tree

1 file changed

+48
-7
lines changed

1 file changed

+48
-7
lines changed

‎pg_pathman--1.0--1.1.sql

Lines changed: 48 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
1-
/***********************************************************************
1+
/* ------------------------------------------------------------------------
2+
*
3+
* pg_pathman--1.0--1.1.sql
4+
*Migration scripts to version 1.1
5+
*
6+
* Copyright (c) 2015-2016, Postgres Professional
7+
*
8+
* ------------------------------------------------------------------------
9+
*/
10+
11+
12+
/* ------------------------------------------------------------------------
213
* Modify config params table
3-
**********************************************************************/
14+
* ----------------------------------------------------------------------*/
415
ALTERTABLE @extschema@.pathman_config_params ADD COLUMN init_callback REGPROCEDURENOT NULL DEFAULT0;
516
ALTERTABLE @extschema@.pathman_config_params ALTER COLUMN enable_parentSET DEFAULT FALSE;
617

7-
/* Enable permissions*/
18+
19+
/* ------------------------------------------------------------------------
20+
* Enable permissions
21+
* ----------------------------------------------------------------------*/
822
GRANTSELECT, INSERT,UPDATE,DELETE
923
ON @extschema@.pathman_config, @extschema@.pathman_config_params
1024
TO public;
@@ -27,8 +41,10 @@ ALTER TABLE @extschema@.pathman_config_params ENABLE ROW LEVEL SECURITY;
2741

2842
GRANTSELECTON @extschema@.pathman_concurrent_part_tasks TO PUBLIC;
2943

30-
/* Drop irrelevant functions*/
31-
DROPFUNCTION @extschema@.invalidate_relcache(OID);
44+
45+
/* ------------------------------------------------------------------------
46+
* Drop irrelevant functions
47+
* ----------------------------------------------------------------------*/
3248
DROPFUNCTION @extschema@.pathman_set_param(REGCLASS,TEXT,BOOLEAN);
3349
DROPFUNCTION @extschema@.enable_parent(REGCLASS);
3450
DROPFUNCTION @extschema@.disable_parent(relation REGCLASS);
@@ -61,7 +77,10 @@ DROP FUNCTION @extschema@.get_range_by_part_oid(REGCLASS, REGCLASS, ANYELEMENT);
6177
DROPFUNCTION @extschema@.get_min_range_value(REGCLASS, ANYELEMENT);
6278
DROPFUNCTION @extschema@.get_max_range_value(REGCLASS, ANYELEMENT);
6379

64-
/* Alter functions' modifiers*/
80+
81+
/* ------------------------------------------------------------------------
82+
* Alter functions' modifiers
83+
* ----------------------------------------------------------------------*/
6584
ALTERFUNCTION @extschema@.partitions_count(REGCLASS) STRICT;
6685
ALTERFUNCTION @extschema@.partition_data(REGCLASS, OUTBIGINT) STRICT;
6786
ALTERFUNCTION @extschema@.disable_pathman_for(REGCLASS) STRICT;
@@ -71,7 +90,29 @@ ALTER FUNCTION @extschema@.drop_triggers(REGCLASS) STRICT;
7190
ALTERFUNCTION @extschema@.check_overlap(REGCLASS, ANYELEMENT, ANYELEMENT) CALLEDONNULL INPUT;
7291
ALTERFUNCTION @extschema@.find_or_create_range_partition(REGCLASS, ANYELEMENT) CALLEDONNULL INPUT;
7392

74-
/* Create functions*/
93+
94+
/* ------------------------------------------------------------------------
95+
* Add new views
96+
* ----------------------------------------------------------------------*/
97+
CREATEOR REPLACE FUNCTION @extschema@.show_partition_list()
98+
RETURNS TABLE (
99+
parentREGCLASS,
100+
partitionREGCLASS,
101+
parttypeINT4,
102+
partattrTEXT,
103+
range_minTEXT,
104+
range_maxTEXT)
105+
AS'pg_pathman','show_partition_list_internal' LANGUAGE C STRICT;
106+
107+
CREATEOR REPLACE VIEW @extschema@.pathman_partition_list
108+
ASSELECT*FROM @extschema@.show_partition_list();
109+
110+
GRANTSELECTON @extschema@.pathman_partition_list TO PUBLIC;
111+
112+
113+
/* ------------------------------------------------------------------------
114+
* (Re)create functions
115+
* ----------------------------------------------------------------------*/
75116
CREATEOR REPLACE FUNCTION @extschema@.pathman_set_param(
76117
relationREGCLASS,
77118
paramTEXT,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp