Re: Recursive Arrays 101
От | Gavin Flower |
---|---|
Тема | Re: Recursive Arrays 101 |
Дата | |
Msg-id | 562EA991.9030306@archidevsys.co.nz обсуждение исходный текст |
Ответ на | Re: Recursive Arrays 101 (David Blomstrom <david.blomstrom@gmail.com>) |
Список | pgsql-general |
On 27/10/15 11:18, David Blomstrom wrote: > I pasted this into the shell... > > CREATE ROLE david > LOGIN > CREATEDB; > > CREATE DATABASE GeoZoo2 > OWNER david; > > and I did it again, replacing LOGIN with my password, but when I > refresh pgAdmin III, there are no new databases. > > And when I paste this in, it doesn't create a table... > > CREATE TABLE public.gz_life_mammals2 > ( > id int PRIMARY KEY, > taxon text UNIQUE NOT NULL, > parent text NOT NULL, > slug text, > name_common text, > plural text, > extinct smallint NOT NULL, > rank smallint NOT NULL, > key smallint NOT NULL > ); You can list all the databases with '\l' and the tables with '\dt' in psql, for example: $ psql psql (9.4.4) Type "help" for help. gavin=> \l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges --------------------+------------+----------+-------------+-------------+----------------------- gavin | gavin | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | greeter_quickstart | jboss_dev | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | jboss_dev_db | jboss_dev | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | jboss_sys_db | jboss_sys | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | jboss_test_db | jboss_test | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | mydb | mydb_admin | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | pgsp2ed | gavin | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | postgres | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | postgresql_book | gavin | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | template0 | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres (11 rows) gavin=> \c pgsp2ed You are now connected to database "pgsp2ed" as user "gavin". pgsp2ed=> \dt List of relations Schema | Name | Type | Owner --------+--------------------------+-------+---------- public | accounts | table | gavin public | application_settings_new | table | gavin public | application_settings_old | table | gavin public | fiverow | table | gavin public | fiverows | table | gavin public | fruit | table | gavin public | fruit_in_stock | table | gavin public | fruit_offer | table | gavin public | modified_table | table | gavin public | modify_test | table | gavin public | my_data | table | gavin public | name | table | gavin public | names | table | gavin public | namex | table | gavin public | notify_test | table | gavin public | original_database | table | gavin public | original_user | table | gavin public | salary | table | fred public | salary_change_log | table | fred public | test | table | postgres public | test1 | table | gavin public | test2 | table | gavin public | test3 | table | gavin public | tmp_setting | table | gavin public | word | table | gavin (25 rows) pgsp2ed=> \q $ Cheers, Gavin
В списке pgsql-general по дате отправления: