pgFouine: PostgreSQL log analysis report

Normalized reports are marked with a "(N)".

Overall statistics ^

Queries by type ^

Type Count Percentage
SELECT 43,744 95.2
INSERT 9 0.0

Queries that took up the most time (N) ^

Rank Total duration Times executed Av. duration (s) Query
1 38.5s 0.01
SELECT attname AS column_name , attlen AS column_length , CASE WHEN pg_type.typname = '' AND EXISTS (SELECT TRUE FROM pg_catalog.pg_depend JOIN pg_catalog.pg_class ON (pg_class.oid = objid) WHERE refobjsubid = attnum AND refobjid = attrelid AND relkind = '') THEN '' WHEN pg_type.typname = '' AND EXISTS (SELECT TRUE FROM pg_catalog.pg_depend JOIN pg_catalog.pg_class ON (pg_class.oid = objid) WHERE refobjsubid = attnum AND refobjid = attrelid AND relkind = '') THEN '' ELSE pg_catalog.format_type(atttypid, atttypmod) END AS column_type , CASE WHEN attnotnull THEN cast('' AS text) ELSE cast('' AS text) END AS column_null , CASE WHEN pg_type.typname IN (...) AND EXISTS (SELECT TRUE FROM pg_catalog.pg_depend JOIN pg_catalog.pg_class ON (pg_class.oid = objid) WHERE refobjsubid = attnum AND refobjid = attrelid AND relkind = '') THEN NULL ELSE adsrc END AS column_default , pg_catalog.col_description(attrelid, attnum) AS column_description , attnum FROM pg_catalog.pg_attribute JOIN pg_catalog.pg_type ON (pg_type.oid = atttypid) LEFT JOIN pg_catalog.pg_attrdef ON ( attrelid = adrelid AND attnum = adnum) WHERE attnum > 0 AND attisdropped IS FALSE AND attrelid = 0;
2 30.5s 0.00
SELECT oid, typname FROM pg_type;
3 9.6s 0.00
SELECT conname AS constraint_name , pg_catalog.pg_get_indexdef(d.objid) AS constraint_definition , CASE WHEN contype = '' THEN '' ELSE '' END AS constraint_type FROM pg_catalog.pg_constraint AS c JOIN pg_catalog.pg_depend AS d ON (d.refobjid = c.oid) WHERE contype IN (...) AND deptype = '' AND conrelid = 0;
4 6.9s 1.38
SELECT md5(gm.concat_table_structure(0::integer)) AS md5;
5 1.8s 1.84
COPY blobs.doc_obj (pk, fk_doc, seq_idx, comment, fk_intended_reviewer, DATA, filename) TO stdout;
6 1.6s 0.20
SELECT nspname AS namespace , relname AS tablename , pg_catalog.pg_get_userbyid(relowner) AS tableowner , pg_class.oid , pg_catalog.obj_description(pg_class.oid, '') AS table_description , relacl , CASE WHEN relkind = '' THEN '' WHEN relkind = '' THEN '' ELSE '' END AS reltype , CASE WHEN relkind = '' THEN pg_get_viewdef(pg_class.oid) ELSE NULL END AS view_definition FROM pg_catalog.pg_class JOIN pg_catalog.pg_namespace ON (relnamespace = pg_namespace.oid) WHERE relkind IN (...) AND relname ~ '' AND nspname !~ '' AND nspname ~ '';
7 1.5s 0.31
SELECT DISTINCT ON (abbrev) name FROM pg_timezone_names WHERE abbrev = '' AND name ~ '' AND name !~ '';
8 1.1s 1.05
COPY i18n.KEYS (pk, orig) TO stdout;
9 1.0s 0.19
SHOW ALL;
10 0.9s 0.00
SELECT a.attnum, a.attname, a.atttypmod, a.attstattarget, a.attstorage, t.typstorage, a.attnotnull, a.atthasdef, a.attisdropped, a.attlen, a.attalign, a.attislocal, pg_catalog.format_type(t.oid,a.atttypmod) AS atttypname, array_to_string(a.attoptions, '') AS attoptions, CASE WHEN a.attcollation <> t.typcollation THEN a.attcollation ELSE 0 END AS attcollation FROM pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_type t ON a.atttypid = t.oid WHERE a.attrelid = ''::pg_catalog.oid AND a.attnum > 0::pg_catalog.int2 ORDER BY a.attrelid, a.attnum;
11 0.8s 0.17
SELECT *, _(role) AS l10n_role FROM dem.v_staff WHERE db_user = CURRENT_USER;
12 0.8s 0.39
( SELECT pk_episode AS DATA, description AS field_label, coalesce ( description || '' || health_issue, description ) AS list_label, 0 AS rank FROM clin.v_pat_episodes WHERE episode_open IS true AND description ILIKE '' ) UNION ALL ( SELECT pk_episode AS DATA, description AS field_label, coalesce ( description || _('') || '' || health_issue, description || _('') ) AS list_label, 0 AS rank FROM clin.v_pat_episodes WHERE description ILIKE '' AND episode_open IS false ) ORDER BY rank, list_label LIMIT 0;
13 0.7s 0.00
SELECT t.tableoid, t.oid, t.relname AS indexname, pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, t.relnatts AS indnkeys, i.indkey, i.indisclustered, c.contype, c.conname, c.condeferrable, c.condeferred, c.tableoid AS contableoid, c.oid AS conoid, pg_catalog.pg_get_constraintdef(c.oid, false) AS condef, (SELECT spcname FROM pg_catalog.pg_tablespace s WHERE s.oid = t.reltablespace) AS tablespace, array_to_string(t.reloptions, '') AS options FROM pg_catalog.pg_index i JOIN pg_catalog.pg_class t ON (t.oid = i.indexrelid) LEFT JOIN pg_catalog.pg_constraint c ON (i.indrelid = c.conrelid AND i.indexrelid = c.conindid AND c.contype IN (...)) WHERE i.indrelid = ''::pg_catalog.oid AND i.indisvalid ORDER BY indexname;
14 0.7s 0.00
SELECT schemaname , tablename , indexname , substring( indexdef FROM position('' IN indexdef) + 0 FOR length(indexdef) - position('' IN indexdef) - 0 ) AS indexdef FROM pg_catalog.pg_indexes WHERE substring(indexdef FROM 0 FOR 0) != '' AND schemaname = '' AND tablename = '';
15 0.7s 0.67
COPY gm.schema_revision (pk, filename, version, imported) TO stdout;
16 0.6s 0.57
SELECT gm.get_users('gnumed_v16');
17 0.5s 0.00
SELECT parnsp.nspname AS par_schemaname , parcla.relname AS par_tablename , chlnsp.nspname AS chl_schemaname , chlcla.relname AS chl_tablename FROM pg_catalog.pg_inherits JOIN pg_catalog.pg_class AS chlcla ON (chlcla.oid = inhrelid) JOIN pg_catalog.pg_namespace AS chlnsp ON (chlnsp.oid = chlcla.relnamespace) JOIN pg_catalog.pg_class AS parcla ON (parcla.oid = inhparent) JOIN pg_catalog.pg_namespace AS parnsp ON (parnsp.oid = parcla.relnamespace) WHERE chlnsp.nspname = '' AND chlcla.relname = '' AND chlnsp.nspname ~ '' AND parnsp.nspname ~ '';
18 0.5s 0.00
SELECT nspname AS namespace , REPLACE( pg_catalog.format_type(pg_type.oid, typtypmod) , nspname ||'' , '') AS type_name FROM pg_catalog.pg_type JOIN pg_catalog.pg_namespace ON (pg_namespace.oid = typnamespace) WHERE pg_type.oid = 0;
19 0.5s 0.00
SELECT pg_constraint.oid , pg_namespace.nspname AS namespace , CASE WHEN substring(pg_constraint.conname FROM 0 FOR 0) = '' THEN '' ELSE pg_constraint.conname END AS constraint_name , conkey AS constraint_key , confkey AS constraint_fkey , confrelid AS foreignrelid FROM pg_catalog.pg_constraint JOIN pg_catalog.pg_class ON (pg_class.oid = conrelid) JOIN pg_catalog.pg_class AS pc ON (pc.oid = confrelid) JOIN pg_catalog.pg_namespace ON (pg_class.relnamespace = pg_namespace.oid) JOIN pg_catalog.pg_namespace AS pn ON (pn.oid = pc.relnamespace) WHERE contype = '' AND conrelid = 0 AND pg_namespace.nspname ~ '' AND pn.nspname ~ '';
20 0.4s 0.00
SELECT pg_get_constraintdef(oid) AS constraint_source , conname AS constraint_name FROM pg_constraint WHERE conrelid = 0 AND contype = '';

Slowest queries ^

Rank Duration (s) Query
1 1.84
COPY blobs.doc_obj (pk, fk_doc, seq_idx, comment, fk_intended_reviewer, DATA, filename) TO stdout;
2 1.81
SELECT md5(gm.concat_table_structure(19::integer)) AS md5;
3 1.33
SELECT md5(gm.concat_table_structure(19::integer)) AS md5;
4 1.30
SELECT md5(gm.concat_table_structure(18::integer)) AS md5;
5 1.24
SELECT md5(gm.concat_table_structure(18::integer)) AS md5;
6 1.23
SELECT md5(gm.concat_table_structure(18::integer)) AS md5;
7 1.05
COPY i18n.KEYS (pk, orig) TO stdout;
8 0.77
( SELECT pk_episode AS DATA, description AS field_label, coalesce ( description || ' - ' || health_issue, description ) AS list_label, 1 AS rank FROM clin.v_pat_episodes WHERE episode_open IS true AND description ILIKE '%other documents%' ) UNION ALL ( SELECT pk_episode AS DATA, description AS field_label, coalesce ( description || _(' (closed)') || ' - ' || health_issue, description || _(' (closed)') ) AS list_label, 2 AS rank FROM clin.v_pat_episodes WHERE description ILIKE '%other documents%' AND episode_open IS false ) ORDER BY rank, list_label LIMIT 30;
9 0.67
COPY gm.schema_revision (pk, filename, version, imported) TO stdout;
10 0.57
SELECT gm.get_users('gnumed_v16');
11 0.48
SHOW ALL;
12 0.47
SHOW ALL;
13 0.39
SELECT oid, typname FROM pg_type;
14 0.38
COPY ref.paperwork_templates (pk_audit, row_version, modified_when, modified_by, pk, fk_template_type, instance_type, name_short, name_long, external_version, gnumed_revision, engine, in_use, filename, DATA) TO stdout;
15 0.38
SELECT oid, typname FROM pg_type;
16 0.37
SELECT oid, typname FROM pg_type;
17 0.33
SELECT DISTINCT ON (abbrev) name FROM pg_timezone_names WHERE abbrev = 'CET' AND name ~ '^[^/]+/[^/]+$' AND name !~ '^Etc/';
18 0.32
SELECT nspname AS namespace , relname AS tablename , pg_catalog.pg_get_userbyid(relowner) AS tableowner , pg_class.oid , pg_catalog.obj_description(pg_class.oid, 'pg_class') AS table_description , relacl , CASE WHEN relkind = 'r' THEN 'table' WHEN relkind = 's' THEN 'special' ELSE 'view' END AS reltype , CASE WHEN relkind = 'v' THEN pg_get_viewdef(pg_class.oid) ELSE NULL END AS view_definition FROM pg_catalog.pg_class JOIN pg_catalog.pg_namespace ON (relnamespace = pg_namespace.oid) WHERE relkind IN ('r', 's', 'v') AND relname ~ '' AND nspname !~ 'pg_catalog|pg_toast|pg_temp_[0-9]+|information_schema' AND nspname ~ '^';
19 0.31
SELECT DISTINCT ON (abbrev) name FROM pg_timezone_names WHERE abbrev = 'Hora est. Pacífico, Sudamérica' AND name ~ '^[^/]+/[^/]+$' AND name !~ '^Etc/';
20 0.31
COPY i18n.translations (pk, lang, orig, trans) TO stdout;

Most frequent queries (N) ^

Rank Times executed Total duration Av. duration (s) Query
1 30.5s 0.00
SELECT oid, typname FROM pg_type;
2 0.5s 0.00
SELECT nspname AS namespace , REPLACE( pg_catalog.format_type(pg_type.oid, typtypmod) , nspname ||'' , '') AS type_name FROM pg_catalog.pg_type JOIN pg_catalog.pg_namespace ON (pg_namespace.oid = typnamespace) WHERE pg_type.oid = 0;
3 0.3s 0.00
SELECT attname AS attribute_name , relname AS relation_name , nspname AS namespace FROM pg_catalog.pg_attribute JOIN pg_catalog.pg_class ON (pg_class.oid = attrelid) JOIN pg_catalog.pg_namespace ON (relnamespace = pg_namespace.oid) WHERE attrelid = 0 AND attnum = 0;
4 38.5s 0.01
SELECT attname AS column_name , attlen AS column_length , CASE WHEN pg_type.typname = '' AND EXISTS (SELECT TRUE FROM pg_catalog.pg_depend JOIN pg_catalog.pg_class ON (pg_class.oid = objid) WHERE refobjsubid = attnum AND refobjid = attrelid AND relkind = '') THEN '' WHEN pg_type.typname = '' AND EXISTS (SELECT TRUE FROM pg_catalog.pg_depend JOIN pg_catalog.pg_class ON (pg_class.oid = objid) WHERE refobjsubid = attnum AND refobjid = attrelid AND relkind = '') THEN '' ELSE pg_catalog.format_type(atttypid, atttypmod) END AS column_type , CASE WHEN attnotnull THEN cast('' AS text) ELSE cast('' AS text) END AS column_null , CASE WHEN pg_type.typname IN (...) AND EXISTS (SELECT TRUE FROM pg_catalog.pg_depend JOIN pg_catalog.pg_class ON (pg_class.oid = objid) WHERE refobjsubid = attnum AND refobjid = attrelid AND relkind = '') THEN NULL ELSE adsrc END AS column_default , pg_catalog.col_description(attrelid, attnum) AS column_description , attnum FROM pg_catalog.pg_attribute JOIN pg_catalog.pg_type ON (pg_type.oid = atttypid) LEFT JOIN pg_catalog.pg_attrdef ON ( attrelid = adrelid AND attnum = adnum) WHERE attnum > 0 AND attisdropped IS FALSE AND attrelid = 0;
5 9.6s 0.00
SELECT conname AS constraint_name , pg_catalog.pg_get_indexdef(d.objid) AS constraint_definition , CASE WHEN contype = '' THEN '' ELSE '' END AS constraint_type FROM pg_catalog.pg_constraint AS c JOIN pg_catalog.pg_depend AS d ON (d.refobjid = c.oid) WHERE contype IN (...) AND deptype = '' AND conrelid = 0;
6 0.7s 0.00
SELECT schemaname , tablename , indexname , substring( indexdef FROM position('' IN indexdef) + 0 FOR length(indexdef) - position('' IN indexdef) - 0 ) AS indexdef FROM pg_catalog.pg_indexes WHERE substring(indexdef FROM 0 FOR 0) != '' AND schemaname = '' AND tablename = '';
7 0.5s 0.00
SELECT parnsp.nspname AS par_schemaname , parcla.relname AS par_tablename , chlnsp.nspname AS chl_schemaname , chlcla.relname AS chl_tablename FROM pg_catalog.pg_inherits JOIN pg_catalog.pg_class AS chlcla ON (chlcla.oid = inhrelid) JOIN pg_catalog.pg_namespace AS chlnsp ON (chlnsp.oid = chlcla.relnamespace) JOIN pg_catalog.pg_class AS parcla ON (parcla.oid = inhparent) JOIN pg_catalog.pg_namespace AS parnsp ON (parnsp.oid = parcla.relnamespace) WHERE chlnsp.nspname = '' AND chlcla.relname = '' AND chlnsp.nspname ~ '' AND parnsp.nspname ~ '';
8 0.5s 0.00
SELECT pg_constraint.oid , pg_namespace.nspname AS namespace , CASE WHEN substring(pg_constraint.conname FROM 0 FOR 0) = '' THEN '' ELSE pg_constraint.conname END AS constraint_name , conkey AS constraint_key , confkey AS constraint_fkey , confrelid AS foreignrelid FROM pg_catalog.pg_constraint JOIN pg_catalog.pg_class ON (pg_class.oid = conrelid) JOIN pg_catalog.pg_class AS pc ON (pc.oid = confrelid) JOIN pg_catalog.pg_namespace ON (pg_class.relnamespace = pg_namespace.oid) JOIN pg_catalog.pg_namespace AS pn ON (pn.oid = pc.relnamespace) WHERE contype = '' AND conrelid = 0 AND pg_namespace.nspname ~ '' AND pn.nspname ~ '';
9 0.4s 0.00
SELECT pg_get_constraintdef(oid) AS constraint_source , conname AS constraint_name FROM pg_constraint WHERE conrelid = 0 AND contype = '';
10 0.4s 0.00
SELECT attname, attacl FROM pg_catalog.pg_attribute WHERE attrelid = '' AND NOT attisdropped AND attacl IS NOT NULL ORDER BY attnum;
11 0.4s 0.00
SELECT proretset, prosrc, probin, pg_catalog.pg_get_function_arguments(oid) AS funcargs, pg_catalog.pg_get_function_identity_arguments(oid) AS funciargs, pg_catalog.pg_get_function_result(oid) AS funcresult, proiswindow, provolatile, proisstrict, prosecdef, proconfig, procost, prorows, (SELECT lanname FROM pg_catalog.pg_language WHERE oid = prolang) AS lanname FROM pg_catalog.pg_proc WHERE oid = ''::pg_catalog.oid;
12 0.9s 0.00
SELECT a.attnum, a.attname, a.atttypmod, a.attstattarget, a.attstorage, t.typstorage, a.attnotnull, a.atthasdef, a.attisdropped, a.attlen, a.attalign, a.attislocal, pg_catalog.format_type(t.oid,a.atttypmod) AS atttypname, array_to_string(a.attoptions, '') AS attoptions, CASE WHEN a.attcollation <> t.typcollation THEN a.attcollation ELSE 0 END AS attcollation FROM pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_type t ON a.atttypid = t.oid WHERE a.attrelid = ''::pg_catalog.oid AND a.attnum > 0::pg_catalog.int2 ORDER BY a.attrelid, a.attnum;
13 0.2s 0.00
SELECT tableoid, oid, adnum, pg_catalog.pg_get_expr(adbin, adrelid) AS adsrc FROM pg_catalog.pg_attrdef WHERE adrelid = ''::pg_catalog.oid;
14 0.1s 0.00
ROLLBACK;
15 0.2s 0.00
SELECT tableoid, oid, conname, pg_catalog.pg_get_constraintdef(oid) AS consrc, conislocal FROM pg_catalog.pg_constraint WHERE conrelid = ''::pg_catalog.oid AND contype = '' ORDER BY conname;
16 0.7s 0.00
SELECT t.tableoid, t.oid, t.relname AS indexname, pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, t.relnatts AS indnkeys, i.indkey, i.indisclustered, c.contype, c.conname, c.condeferrable, c.condeferred, c.tableoid AS contableoid, c.oid AS conoid, pg_catalog.pg_get_constraintdef(c.oid, false) AS condef, (SELECT spcname FROM pg_catalog.pg_tablespace s WHERE s.oid = t.reltablespace) AS tablespace, array_to_string(t.reloptions, '') AS options FROM pg_catalog.pg_index i JOIN pg_catalog.pg_class t ON (t.oid = i.indexrelid) LEFT JOIN pg_catalog.pg_constraint c ON (i.indrelid = c.conrelid AND i.indexrelid = c.conindid AND c.contype IN (...)) WHERE i.indrelid = ''::pg_catalog.oid AND i.indisvalid ORDER BY indexname;
17 0.2s 0.00
SELECT tgname, tgfoid::pg_catalog.regproc AS tgfname, pg_catalog.pg_get_triggerdef(oid, false) AS tgdef, tgenabled, tableoid, oid FROM pg_catalog.pg_trigger t WHERE tgrelid = ''::pg_catalog.oid AND NOT tgisinternal;
18 0.1s 0.00
SELECT tableoid, oid, conname, confrelid, pg_catalog.pg_get_constraintdef(oid) AS condef FROM pg_catalog.pg_constraint WHERE conrelid = ''::pg_catalog.oid AND contype = '';
19 0.0s 0.00
SELECT pg_catalog.format_type(''::pg_catalog.oid, NULL);
20 0.3s 0.00
SELECT pg_catalog.pg_get_viewdef(''::pg_catalog.oid) AS viewdef;

Slowest queries (N) ^

Rank Av. duration (s) Times executed Total duration Query
1 1.84 1.8s
COPY blobs.doc_obj (pk, fk_doc, seq_idx, comment, fk_intended_reviewer, DATA, filename) TO stdout;
2 1.38 6.9s
SELECT md5(gm.concat_table_structure(0::integer)) AS md5;
3 1.05 1.1s
COPY i18n.KEYS (pk, orig) TO stdout;
4 0.67 0.7s
COPY gm.schema_revision (pk, filename, version, imported) TO stdout;
5 0.57 0.6s
SELECT gm.get_users('gnumed_v16');
6 0.39 0.8s
( SELECT pk_episode AS DATA, description AS field_label, coalesce ( description || '' || health_issue, description ) AS list_label, 0 AS rank FROM clin.v_pat_episodes WHERE episode_open IS true AND description ILIKE '' ) UNION ALL ( SELECT pk_episode AS DATA, description AS field_label, coalesce ( description || _('') || '' || health_issue, description || _('') ) AS list_label, 0 AS rank FROM clin.v_pat_episodes WHERE description ILIKE '' AND episode_open IS false ) ORDER BY rank, list_label LIMIT 0;
7 0.38 0.4s
COPY ref.paperwork_templates (pk_audit, row_version, modified_when, modified_by, pk, fk_template_type, instance_type, name_short, name_long, external_version, gnumed_revision, engine, in_use, filename, DATA) TO stdout;
8 0.31 1.5s
SELECT DISTINCT ON (abbrev) name FROM pg_timezone_names WHERE abbrev = '' AND name ~ '' AND name !~ '';
9 0.31 0.3s
COPY i18n.translations (pk, lang, orig, trans) TO stdout;
10 0.28 0.3s
COPY gm.notifying_tables (pk, schema_name, table_name, signal, carries_identity_pk) TO stdout;
11 0.25 0.2s
SELECT DISTINCT ON (pk_identity) * FROM ( SELECT * FROM (( SELECT vbp.*, 'last name'::text AS match_type FROM dem.v_basic_person vbp, dem.names n WHERE vbp.pk_identity = n.id_identity AND lower(n.lastnames) ~* lower('^kirk') ) UNION ALL ( SELECT vbp.*, 'first name'::text AS match_type FROM dem.v_basic_person vbp, dem.names n WHERE vbp.pk_identity = n.id_identity AND lower(n.firstnames) ~* lower('^kirk') ) UNION ALL ( SELECT vbp.*, 'any name part'::text AS match_type FROM dem.v_basic_person vbp, dem.names n WHERE vbp.pk_identity = n.id_identity AND lower(n.firstnames || ' ' || n.lastnames || ' ' || coalesce(n.preferred, '')) ~* lower('kirk') )) AS super_list ORDER BY lastnames, firstnames, dob ) AS sorted_list;
12 0.20 1.6s
SELECT nspname AS namespace , relname AS tablename , pg_catalog.pg_get_userbyid(relowner) AS tableowner , pg_class.oid , pg_catalog.obj_description(pg_class.oid, '') AS table_description , relacl , CASE WHEN relkind = '' THEN '' WHEN relkind = '' THEN '' ELSE '' END AS reltype , CASE WHEN relkind = '' THEN pg_get_viewdef(pg_class.oid) ELSE NULL END AS view_definition FROM pg_catalog.pg_class JOIN pg_catalog.pg_namespace ON (relnamespace = pg_namespace.oid) WHERE relkind IN (...) AND relname ~ '' AND nspname !~ '' AND nspname ~ '';
13 0.19 1.0s
SHOW ALL;
14 0.17 0.2s
SELECT EXISTS (SELECT 1 FROM pg_database WHERE datname LIKE 'gnumed_v%' AND substring(datname FROM 9 FOR 3)::integer > '16');
15 0.17 0.8s
SELECT *, _(role) AS l10n_role FROM dem.v_staff WHERE db_user = CURRENT_USER;
16 0.16 0.2s
SELECT substring(image FROM 1 FOR 26780) FROM ref.tag_image WHERE pk = 5;
17 0.14 0.1s
SELECT oid, rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolconnlimit, rolpassword, rolvaliduntil, rolreplication, pg_catalog.shobj_description(oid, 'pg_authid') AS rolcomment FROM pg_authid ORDER BY 2;
18 0.12 0.1s
COPY public.form_field_types (name, pk) TO stdout;
19 0.11 0.2s
SELECT c.tableoid, c.oid, c.relname, c.relacl, c.relkind, c.relnamespace, (SELECT rolname FROM pg_catalog.pg_roles WHERE oid = c.relowner) AS rolname, c.relchecks, c.relhastriggers, c.relhasindex, c.relhasrules, c.relhasoids, c.relfrozenxid, tc.oid AS toid, tc.relfrozenxid AS tfrozenxid, c.relpersistence, CASE WHEN c.reloftype <> 0 THEN c.reloftype::pg_catalog.regtype ELSE NULL END AS reloftype, d.refobjid AS owning_tab, d.refobjsubid AS owning_col, (SELECT spcname FROM pg_tablespace t WHERE t.oid = c.reltablespace) AS reltablespace, array_to_string(c.reloptions, '') AS reloptions, array_to_string(array(SELECT '' || x FROM unnest(tc.reloptions) x), '') AS toast_reloptions FROM pg_class c LEFT JOIN pg_depend d ON (c.relkind = '' AND d.classid = c.tableoid AND d.objid = c.oid AND d.objsubid = 0 AND d.refclassid = c.tableoid AND d.deptype = '') LEFT JOIN pg_class tc ON (c.reltoastrelid = tc.oid) WHERE c.relkind IN (...) ORDER BY c.oid;
20 0.10 0.1s
COPY ref.atc (pk_coding_system, code, term, fk_data_source, comment, pk, ddd, unit, administration_route) TO stdout;
Table of contents