Project

General

Profile

« Previous | Next » 

Revision 11855

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

View differences:

lib/sh/db.sh
357 357
	)
358 358
}
359 359

  
360
pg_schema_exists() # usage: schema=... pg_schema_exists
361
{
362
	echo_func; : "${schema:?}"; mk_schema_esc
363
	pattern='cannot create temporary relation in non-temporary schema' \
364
stderr_matches try psql <<<"CREATE TEMP TABLE $schema_esc.t ()"
365
}
366

  
360 367
pg_table_exists() # usage: [schema=...] table=... pg_table_exists
361 368
{
362 369
	echo_func; : "${table:?}"; mk_table_esc

Also available in: Unified diff