File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 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+ ```
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments