Project

General

Profile

« Previous | Next » 

Revision 11859

lib/sh/db.sh: added pg_require_schema()

View differences:

lib/sh/db.sh
364 364
stderr_matches try psql <<<"CREATE TEMP TABLE $schema_esc.t ()"
365 365
}
366 366

  
367
pg_require_schema() # usage: schema=... pg_require_schema
368
{
369
	echo_func; : "${schema:?}"
370
	clog++ pg_schema_exists || die "schema $schema does not exist"
371
}
372

  
367 373
pg_table_exists() # usage: [schema=...] table=... pg_table_exists
368 374
{
369 375
	echo_func; : "${table:?}"; mk_table_esc

Also available in: Unified diff