statements

package
v0.11.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2019 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Databases = `
SELECT
  datname
FROM
  pg_database
WHERE
  NOT datistemplate
ORDER BY
  datname ASC`

	Schemas = `
SELECT
  schema_name
FROM
  information_schema.schemata
ORDER BY
  schema_name ASC`

	Info = `` /* 186-byte string literal not displayed */

	EstimatedTableRowCount = `
SELECT
	reltuples
FROM
	pg_class
WHERE
	oid = ('"' || $1::text || '"."' || $2::text || '"')::regclass
`

	TableIndexes = `
SELECT
  indexname, indexdef
FROM
  pg_indexes
WHERE
  schemaname = $1 AND
  tablename = $2`

	TableConstraints = `` /* 255-byte string literal not displayed */

	TableInfo = `` /* 244-byte string literal not displayed */

	TableInfoCockroach = `
SELECT
  'n/a' AS data_size,
  'n/a' AS index_size,
  'n/a' AS total_size,
  'n/a' AS rows_count`

	TableSchema = `` /* 323-byte string literal not displayed */

	MaterializedView = `` /* 329-byte string literal not displayed */

	Objects = `` /* 689-byte string literal not displayed */

)

Variables

View Source
var (
	Activity = map[string]string{
		"default": "SELECT * FROM pg_stat_activity WHERE datname = current_database()",
		"9.1":     "SELECT datname, current_query, waiting, query_start, procpid as pid, datid, application_name, client_addr FROM pg_stat_activity WHERE datname = current_database()",
		"9.2":     "SELECT datname, query, state, waiting, query_start, state_change, pid, datid, application_name, client_addr FROM pg_stat_activity WHERE datname = current_database()",
		"9.3":     "SELECT datname, query, state, waiting, query_start, state_change, pid, datid, application_name, client_addr FROM pg_stat_activity WHERE datname = current_database()",
		"9.4":     "SELECT datname, query, state, waiting, query_start, state_change, pid, datid, application_name, client_addr FROM pg_stat_activity WHERE datname = current_database()",
		"9.5":     "SELECT datname, query, state, waiting, query_start, state_change, pid, datid, application_name, client_addr FROM pg_stat_activity WHERE datname = current_database()",
		"9.6":     "SELECT datname, query, state, wait_event, wait_event_type, query_start, state_change, pid, datid, application_name, client_addr FROM pg_stat_activity WHERE datname = current_database()",
	}
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL