Gets the maximum value of the self-increment ID in the every_check_accident table
SELECT Last_value from Every_check_accident_id_seq;
$list = Db::getinstance (self::D bname)->pg_insert_id (' every_check_accident ', ' id ');
View the version of Postgre
Select version ();
$list = Db::getinstance (self::D bname)->serverinfo (); # Get Database version
Lock line (not tested)
Select 1 as Adodbignore from $tables where $where for update
$list = Db::getinstance (self::D bname)->rowlock ($tables, $where);
Querying all table names in the library (excluding system catalog tables)
Select table_name, ' T ' from Information_schema.tables where Table_schema isn't in (' Pg_catalog ', ' information_schema ')
Union
Select table_name, ' V ' from Information_schema.views where Table_schema isn't in (' Pg_catalog ', ' information_schema ')
$list = Db::getinstance (self::D bname)->metatables (false, false); Get all table names
$list = Db::getinstance (self::D bname)->metatables (True, true); Get all the views
PostgreSQL some basic operations