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

Commit1cbe237

Browse files
committed
add pathman update checker utilities
1 parent6192af7 commit1cbe237

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

‎tests/update/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
##pg_pathman's update checker
2+
3+
It's necessary to check that`ALTER EXTENSION pg_pathman UPDATE` produces an SQL frontend that is exactly the same as a fresh install.
4+
5+
Usage:
6+
7+
```bash
8+
PG_CONFIG=... ./dump_pathman_objects %DBNAME%
9+
10+
diff file_1 file_2
11+
```

‎tests/update/dump_pathman_objects

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/bash
2+
3+
4+
rndstr=$(head /dev/urandom| tr -dc A-Za-z0-9| head -c 13;echo'')
5+
bindir=$($PG_CONFIG --bindir)
6+
dbname=$1
7+
flname=pathman_objects_$rndstr.txt
8+
9+
# show file name
10+
echo$flname
11+
12+
$bindir/psql$dbname<<EOF
13+
14+
\o$flname
15+
16+
SELECT pg_get_functiondef(objid)
17+
FROM pg_catalog.pg_depend JOIN pg_proc ON pg_proc.oid = pg_depend.objid
18+
WHERE refclassid = 'pg_catalog.pg_extension'::REGCLASS AND
19+
refobjid = (SELECT oid
20+
FROM pg_catalog.pg_extension
21+
WHERE extname = 'pg_pathman') AND
22+
deptype = 'e'
23+
ORDER BY objid::regprocedure::TEXT ASC;
24+
25+
\d+ pathman_config
26+
\d+ pathman_config_params
27+
\d+ pathman_partition_list
28+
\d+ pathman_cache_stats
29+
\d+ pathman_concurrent_part_tasks
30+
31+
EOF

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp