Сообщения

Сообщения за ноябрь, 2020

SQL

Изображение
Part I. Create a database   login into Postgres sudo -u postgres psql  show databases command to see all databases \l to create database shop just enter  create database shop; Now I want to see that we really have created the database shop. "shop" must be in the list \l Let's continue with the shop database we have just created. For that, we need to connect the shop database  \c shop See what is in the database. So far it should be "Did not find any relations" since we did not add anything to it.  \d Let's create our first table named CUSTOMER by typing following  create table customer( id serial primary key, name varchar(255), phone varchar(30), email varchar(255) ); You can type it in one line if you like. Check if the table has been created. Now the list should contain created database.   \d Let's see more details about our first just created table CUSTOMER. \d customer Now it's time to create table PRODUCT ...

pgAdmin export, сохранение результатов запроса в файл .csv; проблема дефолтных настроек при переходе с pgAdmin3 на pgAdmin4

Изображение
ЗАДАЧА Изменить формат при сохранении результатов запроса в файл .csv При переходе с pgAdmin3 на PgAdmin4 экспорт результатов исполнения скриптов стал выполнятся в .csv f файл, где сепоратор это запятая, а пропущенные значения записаны как NULL. Проблема в том, что до этого экспорт результатов в файл из pgAdmin выполнялся с сепаратором ";", а путные значения были пустыми строками.  Solutin 1) File -> Preferences  2) Query Tool -> CSV/TXT Output Готово