C:\Users\Maxwell Pan>pg_ctl status
pg_ctl: no server running
C:\Users\Maxwell Pan>pg_ctl start
waiting for server to start....2023-04-25 11:14:13.053 CST [18480] LOG: redirecting log output to logging collector process
2023-04-25 11:14:13.053 CST [18480] HINT: Future log output will appear in directory "log".
done
server started
C:\Users\Maxwell Pan>psql -U postgres
Password for user postgres:
psql (15.2)
WARNING: Console code page (437) differs from Windows code page (1252)
8-bit characters might not work correctly. See psql reference
page "Notes for Windows users" for details.
Type "help" for help.
postgres=#
postgres=# select * from pg_shadow;
usename | usesysid | usecreatedb | usesuper | userepl | usebypassrls | passwd | valuntil | useconfig
----------+----------+-------------+----------+---------+--------------+---------------------------------------------------------------------------------------------------------------------------------------+----------+-----------
postgres | 10 | t | t | t | t | SCRAM-SHA-256$4096:BsDkIbrb3e4lL2bBCKcIbQ==$yWewHz+ULWqS9xQ5W3TqomcYotcKBAD336pvH49UyD4=:pyeJzwmbkoZm+OPQL00FjIAJBjIfDz3ezDIyxKf/rU4= | |
scott | 24582 | f | t | f | f | SCRAM-SHA-256$4096:64U6TqdG6RXDfdexWkhcpg==$ZSPC0F/0fQ5RSNv3W0b4JHIB5TlzbJyiBx6EJyiWkkk=:xJBm0R3A/4QR8jHuxL+IUjOoeYer/XI5D7n56mA1VXY= | |
sam | 24601 | t | f | f | f | SCRAM-SHA-256$4096:7AmjizcS4uCraRXSVGjFsg==$9fPB5r0mitAcovh11q+VKYmSTo9wDJRuSkjw4jocxKM=:Xm+mODf5X872X77IcfOrihFh2ozVnTptnNO+bpaVnnM= | |
ronk | 32772 | f | f | f | f | SCRAM-SHA-256$4096:jaHP7s41pulrAbEcKfaUdA==$/Ex3pDDQu7Vc9kqN0YOiUO/ZMnHXnct+3ap3MXMz9ng=:Cf7w7JHZ1YbmV0NEnZzz5NK16Lj5FU/5s62FHMZSqxk= | |
ron | 24599 | f | f | f | f | | |
(5 rows)
postgres=# \du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------------------+-----------
postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
ron | | {}
ronk | | {}
sam | Create DB | {}
scott | Superuser | {}
postgres=# select * from pg_timezone_names;
name | abbrev | utc_offset | is_dst
----------------------------------+--------+------------+--------
Africa/Abidjan | GMT | 00:00:00 | f
Africa/Accra | GMT | 00:00:00 | f
Africa/Addis_Ababa | EAT | 03:00:00 | f
Africa/Algiers | CET | 01:00:00 | f
Africa/Asmara | EAT | 03:00:00 | f
Africa/Asmera | EAT | 03:00:00 | f
Africa/Bamako | GMT | 00:00:00 | f
Africa/Bangui | WAT | 01:00:00 | f
Africa/Banjul | GMT | 00:00:00 | f
Africa/Bissau | GMT | 00:00:00 | f
Africa/Blantyre | CAT | 02:00:00 | f
Africa/Brazzaville | WAT | 01:00:00 | f
Africa/Bujumbura | CAT | 02:00:00 | f
Africa/Cairo | EET | 02:00:00 | f
Africa/Casablanca | +00 | 00:00:00 | t
Africa/Ceuta | CEST | 02:00:00 | t
Africa/Conakry | GMT | 00:00:00 | f
Africa/Dakar | GMT | 00:00:00 | f
Africa/Dar_es_Salaam | EAT | 03:00:00 | f
Africa/Djibouti | EAT | 03:00:00 | f
Africa/Douala | WAT | 01:00:00 | f
Africa/El_Aaiun | +00 | 00:00:00 | t
Africa/Freetown | GMT | 00:00:00 | f
Africa/Gaborone | CAT | 02:00:00 | f
Africa/Harare | CAT | 02:00:00 | f
Africa/Johannesburg | SAST | 02:00:00 | f
Africa/Juba | CAT | 02:00:00 | f
Africa/Kampala | EAT | 03:00:00 | f
Africa/Khartoum | CAT | 02:00:00 | f
Africa/Kigali | CAT | 02:00:00 | f
Africa/Kinshasa | WAT | 01:00:00 | f
Africa/Lagos | WAT | 01:00:00 | f
Africa/Libreville | WAT | 01:00:00 | f
Africa/Lome | GMT | 00:00:00 | f
Africa/Luanda | WAT | 01:00:00 | f
Africa/Lubumbashi | CAT | 02:00:00 | f
Africa/Lusaka | CAT | 02:00:00 | f
Africa/Malabo | WAT | 01:00:00 | f
Africa/Maputo | CAT | 02:00:00 | f
Africa/Maseru | SAST | 02:00:00 | f
Africa/Mbabane | SAST | 02:00:00 | f
Africa/Mogadishu | EAT | 03:00:00 | f
Africa/Monrovia | GMT | 00:00:00 | f
Africa/Nairobi | EAT | 03:00:00 | f
Africa/Ndjamena | WAT | 01:00:00 | f
Africa/Niamey | WAT | 01:00:00 | f
Africa/Nouakchott | GMT | 00:00:00 | f
Africa/Ouagadougou | GMT | 00:00:00 | f
Africa/Porto-Novo | WAT | 01:00:00 | f
Africa/Sao_Tome | GMT | 00:00:00 | f
Africa/Timbuktu | GMT | 00:00:00 | f
Africa/Tripoli | EET | 02:00:00 | f
Africa/Tunis | CET | 01:00:00 | f
Africa/Windhoek | CAT | 02:00:00 | f
America/Adak | HDT | -09:00:00 | t
America/Anchorage | AKDT | -08:00:00 | t
America/Anguilla | AST | -04:00:00 | f
America/Antigua | AST | -04:00:00 | f
America/Araguaina | -03 | -03:00:00 | f
America/Argentina/Buenos_Aires | -03 | -03:00:00 | f
America/Argentina/Catamarca | -03 | -03:00:00 | f
America/Argentina/ComodRivadavia | -03 | -03:00:00 | f
America/Argentina/Cordoba | -03 | -03:00:00 | f
^CCancel request sent
postgres=#
postgres=#
C:\Users\Maxwell Pan>psql -U postgres
Password for user postgres:
psql (15.2)
WARNING: Console code page (437) differs from Windows code page (1252)
8-bit characters might not work correctly. See psql reference
page "Notes for Windows users" for details.
Type "help" for help.
postgres=# select * from pg_tables;
schemaname | tablename | tableowner | tablespace | hasindexes | hasrules | hastriggers | rowsecurity
--------------------+--------------------------+------------+------------+------------+----------+-------------+-------------
pg_catalog | pg_statistic | postgres | | t | f | f | f
pg_catalog | pg_type | postgres | | t | f | f | f
pg_catalog | pg_foreign_table | postgres | | t | f | f | f
pg_catalog | pg_authid | postgres | pg_global | t | f | f | f
pg_catalog | pg_statistic_ext_data | postgres | | t | f | f | f
pg_catalog | pg_user_mapping | postgres | | t | f | f | f
pg_catalog | pg_subscription | postgres | pg_global | t | f | f | f
pg_catalog | pg_attribute | postgres | | t | f | f | f
pg_catalog | pg_proc | postgres | | t | f | f | f
pg_catalog | pg_class | postgres | | t | f | f | f
pg_catalog | pg_attrdef | postgres | | t | f | f | f
pg_catalog | pg_constraint | postgres | | t | f | f | f
pg_catalog | pg_inherits | postgres | | t | f | f | f
pg_catalog | pg_index | postgres | | t | f | f | f
pg_catalog | pg_operator | postgres | | t | f | f | f
pg_catalog | pg_opfamily | postgres | | t | f | f | f
pg_catalog | pg_opclass | postgres | | t | f | f | f
pg_catalog | pg_am | postgres | | t | f | f | f
pg_catalog | pg_amop | postgres | | t | f | f | f
pg_catalog | pg_amproc | postgres | | t | f | f | f
pg_catalog | pg_language | postgres | | t | f | f | f
pg_catalog | pg_largeobject_metadata | postgres | | t | f | f | f
pg_catalog | pg_aggregate | postgres | | t | f | f | f
pg_catalog | pg_statistic_ext | postgres | | t | f | f | f
pg_catalog | pg_rewrite | postgres | | t | f | f | f
pg_catalog | pg_trigger | postgres | | t | f | f | f
pg_catalog | pg_event_trigger | postgres | | t | f | f | f
pg_catalog | pg_description | postgres | | t | f | f | f
pg_catalog | pg_cast | postgres | | t | f | f | f
pg_catalog | pg_enum | postgres | | t | f | f | f
pg_catalog | pg_namespace | postgres | | t | f | f | f
pg_catalog | pg_conversion | postgres | | t | f | f | f
pg_catalog | pg_depend | postgres | | t | f | f | f
pg_catalog | pg_database | postgres | pg_global | t | f | f | f
pg_catalog | pg_db_role_setting | postgres | pg_global | t | f | f | f
pg_catalog | pg_tablespace | postgres | pg_global | t | f | f | f
pg_catalog | pg_auth_members | postgres | pg_global | t | f | f | f
pg_catalog | pg_shdepend | postgres | pg_global | t | f | f | f
pg_catalog | pg_shdescription | postgres | pg_global | t | f | f | f
pg_catalog | pg_ts_config | postgres | | t | f | f | f
pg_catalog | pg_ts_config_map | postgres | | t | f | f | f
pg_catalog | pg_ts_dict | postgres | | t | f | f | f
pg_catalog | pg_ts_parser | postgres | | t | f | f | f
pg_catalog | pg_ts_template | postgres | | t | f | f | f
pg_catalog | pg_extension | postgres | | t | f | f | f
pg_catalog | pg_foreign_data_wrapper | postgres | | t | f | f | f
pg_catalog | pg_foreign_server | postgres | | t | f | f | f
pg_catalog | pg_policy | postgres | | t | f | f | f
pg_catalog | pg_replication_origin | postgres | pg_global | t | f | f | f
pg_catalog | pg_default_acl | postgres | | t | f | f | f
pg_catalog | pg_init_privs | postgres | | t | f | f | f
pg_catalog | pg_seclabel | postgres | | t | f | f | f
pg_catalog | pg_shseclabel | postgres | pg_global | t | f | f | f
pg_catalog | pg_collation | postgres | | t | f | f | f
pg_catalog | pg_parameter_acl | postgres | pg_global | t | f | f | f
pg_catalog | pg_partitioned_table | postgres | | t | f | f | f
pg_catalog | pg_range | postgres | | t | f | f | f
pg_catalog | pg_transform | postgres | | t | f | f | f
pg_catalog | pg_sequence | postgres | | t | f | f | f
pg_catalog | pg_publication | postgres | | t | f | f | f
pg_catalog | pg_publication_namespace | postgres | | t | f | f | f
pg_catalog | pg_publication_rel | postgres | | t | f | f | f
pg_catalog | pg_subscription_rel | postgres | | t | f | f | f
pg_catalog | pg_largeobject | postgres | | t | f | f | f
information_schema | sql_features | postgres | | f | f | f | f
information_schema | sql_implementation_info | postgres | | f | f | f | f
information_schema | sql_parts | postgres | | f | f | f | f
information_schema | sql_sizing | postgres | | f | f | f | f
(68 rows)
postgres=#
C:\Users\Maxwell Pan>psql -U postgres
Password for user postgres:
psql (15.2)
WARNING: Console code page (437) differs from Windows code page (1252)
8-bit characters might not work correctly. See psql reference
page "Notes for Windows users" for details.
Type "help" for help.
postgres=# select * from pg_tables;
schemaname | tablename | tableowner | tablespace | hasindexes | hasrules | hastriggers | rowsecurity
--------------------+--------------------------+------------+------------+------------+----------+-------------+-------------
pg_catalog | pg_statistic | postgres | | t | f | f | f
pg_catalog | pg_type | postgres | | t | f | f | f
pg_catalog | pg_foreign_table | postgres | | t | f | f | f
pg_catalog | pg_authid | postgres | pg_global | t | f | f | f
pg_catalog | pg_statistic_ext_data | postgres | | t | f | f | f
pg_catalog | pg_user_mapping | postgres | | t | f | f | f
pg_catalog | pg_subscription | postgres | pg_global | t | f | f | f
pg_catalog | pg_attribute | postgres | | t | f | f | f
pg_catalog | pg_proc | postgres | | t | f | f | f
pg_catalog | pg_class | postgres | | t | f | f | f
pg_catalog | pg_attrdef | postgres | | t | f | f | f
pg_catalog | pg_constraint | postgres | | t | f | f | f
pg_catalog | pg_inherits | postgres | | t | f | f | f
pg_catalog | pg_index | postgres | | t | f | f | f
pg_catalog | pg_operator | postgres | | t | f | f | f
pg_catalog | pg_opfamily | postgres | | t | f | f | f
pg_catalog | pg_opclass | postgres | | t | f | f | f
pg_catalog | pg_am | postgres | | t | f | f | f
pg_catalog | pg_amop | postgres | | t | f | f | f
pg_catalog | pg_amproc | postgres | | t | f | f | f
pg_catalog | pg_language | postgres | | t | f | f | f
pg_catalog | pg_largeobject_metadata | postgres | | t | f | f | f
pg_catalog | pg_aggregate | postgres | | t | f | f | f
pg_catalog | pg_statistic_ext | postgres | | t | f | f | f
pg_catalog | pg_rewrite | postgres | | t | f | f | f
pg_catalog | pg_trigger | postgres | | t | f | f | f
pg_catalog | pg_event_trigger | postgres | | t | f | f | f
pg_catalog | pg_description | postgres | | t | f | f | f
pg_catalog | pg_cast | postgres | | t | f | f | f
pg_catalog | pg_enum | postgres | | t | f | f | f
pg_catalog | pg_namespace | postgres | | t | f | f | f
pg_catalog | pg_conversion | postgres | | t | f | f | f
pg_catalog | pg_depend | postgres | | t | f | f | f
pg_catalog | pg_database | postgres | pg_global | t | f | f | f
pg_catalog | pg_db_role_setting | postgres | pg_global | t | f | f | f
pg_catalog | pg_tablespace | postgres | pg_global | t | f | f | f
pg_catalog | pg_auth_members | postgres | pg_global | t | f | f | f
pg_catalog | pg_shdepend | postgres | pg_global | t | f | f | f
pg_catalog | pg_shdescription | postgres | pg_global | t | f | f | f
pg_catalog | pg_ts_config | postgres | | t | f | f | f
pg_catalog | pg_ts_config_map | postgres | | t | f | f | f
pg_catalog | pg_ts_dict | postgres | | t | f | f | f
pg_catalog | pg_ts_parser | postgres | | t | f | f | f
pg_catalog | pg_ts_template | postgres | | t | f | f | f
pg_catalog | pg_extension | postgres | | t | f | f | f
pg_catalog | pg_foreign_data_wrapper | postgres | | t | f | f | f
pg_catalog | pg_foreign_server | postgres | | t | f | f | f
pg_catalog | pg_policy | postgres | | t | f | f | f
pg_catalog | pg_replication_origin | postgres | pg_global | t | f | f | f
pg_catalog | pg_default_acl | postgres | | t | f | f | f
pg_catalog | pg_init_privs | postgres | | t | f | f | f
pg_catalog | pg_seclabel | postgres | | t | f | f | f
pg_catalog | pg_shseclabel | postgres | pg_global | t | f | f | f
pg_catalog | pg_collation | postgres | | t | f | f | f
pg_catalog | pg_parameter_acl | postgres | pg_global | t | f | f | f
pg_catalog | pg_partitioned_table | postgres | | t | f | f | f
pg_catalog | pg_range | postgres | | t | f | f | f
pg_catalog | pg_transform | postgres | | t | f | f | f
pg_catalog | pg_sequence | postgres | | t | f | f | f
pg_catalog | pg_publication | postgres | | t | f | f | f
pg_catalog | pg_publication_namespace | postgres | | t | f | f | f
pg_catalog | pg_publication_rel | postgres | | t | f | f | f
pg_catalog | pg_subscription_rel | postgres | | t | f | f | f
pg_catalog | pg_largeobject | postgres | | t | f | f | f
information_schema | sql_features | postgres | | f | f | f | f
information_schema | sql_implementation_info | postgres | | f | f | f | f
information_schema | sql_parts | postgres | | f | f | f | f
information_schema | sql_sizing | postgres | | f | f | f | f
(68 rows)
postgres=#