Revision 13343
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/lib/sh/db.sh | ||
---|---|---|
398 | 398 |
|
399 | 399 |
## DB structure |
400 | 400 |
|
401 |
pg_schema_exists() # usage: schema=... pg_schema_exists
|
|
401 |
pg_schema_exists() # usage: schema=__ [benign_error=1] pg_schema_exists
|
|
402 | 402 |
{ |
403 | 403 |
log-- echo_func; : "${schema:?}"; mk_schema_esc |
404 | 404 |
pattern='cannot create temporary relation in non-temporary schema' \ |
... | ... | |
411 | 411 |
pg_schema_exists || die "schema $schema does not exist" |
412 | 412 |
} |
413 | 413 |
|
414 |
pg_table_exists() # usage: [schema=...] table=... pg_table_exists
|
|
414 |
pg_table_exists() # usage: [schema=__] table=__ [benign_error=1] pg_table_exists
|
|
415 | 415 |
{ |
416 | 416 |
echo_func; : "${table:?}"; mk_table_esc |
417 | 417 |
! pattern='relation .* does not exist' \ |
Also available in: Unified diff
fix: *{.sh,run}: stderr_matches() callers: usage: documented that they may require benign_error=1