check_table_field_exists(p_field text, p_table text, p_namespace text)

8.31. check_table_field_exists(p_field text, p_table text, p_namespace text)

Function Properties

Language: PLPGSQL

Return Type: boolean

Check if a table has a specific attribute

BEGIN
	return exists (
			select 1 from "information_schema".columns
				where table_schema = p_namespace
				and table_name = p_table
				and column_name = p_field
		);
END;