Revision 12770
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/lib/sh/local.sh | ||
---|---|---|
84 | 84 |
|
85 | 85 |
public_schema_exists() # usage: prep_try; if public_schema_exists; \ |
86 | 86 |
# then rethrow; ...; fi; rethrow |
87 |
# OR prep_try; public_schema_exists || { rethrow; ...; }; rethrow |
|
87 | 88 |
{ echo_func; schema=public clog++ pg_schema_exists; } |
88 | 89 |
|
89 | 90 |
pg_dump_local() { echo_func; use_local; pg_dump "$@"; } |
trunk/lib/sh/util.sh | ||
---|---|---|
781 | 781 |
|
782 | 782 |
stderr_matches() # wrapper usage: pattern=... [ignore_e=#] stderr_matches cmd... |
783 | 783 |
# wrapper caller usage: prep_try; if [!] wrapper; then rethrow; ...; fi; rethrow |
784 |
# OR prep_try; wrapper || { rethrow; ...; }; rethrow |
|
784 | 785 |
# exit status of cmd is placed in $e for use with exception handling |
785 | 786 |
{ |
786 | 787 |
echo_func; kw_params pattern ignore_e; : "${pattern?}" |
trunk/lib/sh/db.sh | ||
---|---|---|
364 | 364 |
|
365 | 365 |
pg_schema_exists() # usage: prep_try; if schema=... pg_schema_exists; \ |
366 | 366 |
# then rethrow; ...; fi; rethrow |
367 |
# OR prep_try; schema=... pg_schema_exists || { rethrow; ...; }; rethrow |
|
367 | 368 |
{ |
368 | 369 |
echo_func; : "${schema:?}"; mk_schema_esc |
369 | 370 |
prep_try; pattern='cannot create temporary relation in non-temporary schema' \ |
Also available in: Unified diff
stderr_matches(): wrapper caller usage: added alternative usage when using `||`