Клиент для postgresql для linux

Linux downloads (Ubuntu)

PostgreSQL is available in all Ubuntu versions by default. However, Ubuntu «snapshots» a specific version of PostgreSQL that is then supported throughout the lifetime of that Ubuntu version. Other versions of PostgreSQL are available through the PostgreSQL apt repository.

PostgreSQL Apt Repository

If the version included in your version of Ubuntu is not the one you want, you can use the PostgreSQL Apt Repository. This repository will integrate with your normal systems and patch management, and provide automatic updates for all supported versions of PostgreSQL throughout the support lifetime of PostgreSQL.

The PostgreSQL Apt Repository supports the current versions of Ubuntu:

on the following architectures:

  • amd64
  • arm64 (18.04 and newer; LTS releases only)
  • i386 (18.04 and older)
  • ppc64el (LTS releases only)

To use the apt repository, follow these steps:

For more information about the apt repository, including answers to frequent questions, please see the PostgreSQL Apt Repository page on the wiki.

Included in distribution

Ubuntu includes PostgreSQL by default. To install PostgreSQL on Ubuntu, use the apt-get (or other apt-driving) command:

apt-get install postgresql-12

The repository contains many different packages including third party addons. The most common and important packages are (substitute the version number as required):

postgresql-client-12 client libraries and client binaries
postgresql-12 core database server
postgresql-contrib-9.x additional supplied modules (part of the postgresql-xx package in version 10 and later)
libpq-dev libraries and headers for C language frontend development
postgresql-server-dev-12 libraries and headers for C language backend development
pgadmin4 pgAdmin 4 graphical administration utility

Copyright © 1996-2021 The PostgreSQL Global Development Group

Источник

pgAdmin

PostgreSQL Tools

pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world.

pgAdmin may be used on Linux, Unix, macOS and Windows to manage PostgreSQL and EDB Advanced Server 9.5 and above.

Latest Videos

Want to see your pgAdmin video here? Email webmaster@pgadmin.org.

2021-10-07 — pgAdmin 4 v6.0 Released

The pgAdmin Development Team are pleased to announce pgAdmin 4 version 6.0. This release of pgAdmin 4 includes 18 bug fixes and new features. For more details please see the release notes.

Notable changes in this release include:

Introduction to ReactJS framework in pgAdmin 4:

ReactJS has a strong developer community and popularity. It has grown to a level where its performance is comparable to that of desktop applications. Migrating pgAdmin to use ReactJS has proven to boost pgAdmin’s performance and user experience.

In this release we have ported the browser Tree, all the object dialogs, and the Grant Wizard.

Features:

    Added support for OWNED BY Clause for sequences.

This feature adds the OWNED BY clause for the sequences. The OWNED BY option causes the sequence to be associated with a specific table column, such that if that column (or its whole table) is dropped, the sequence will be automatically dropped as well.

Bugs/Housekeeping:

  • Port object nodes and properties dialogs to React.
  • Port browser tree to React.
  • Port Grant Wizard to react.
  • Remove GPDB support completely.
  • Added support to create the Partitioned table using COLLATE and opclass.
  • Fixed keyerror issue in schema diff for ‘attnum’ and ‘edit_types’ parameter.
  • Fixed an issue where the Execute button of the query tool gets disabled once we change anything in the data grid.
  • Ensure that SQL help should work for EPAS servers.
  • Fixed an issue where the grant wizard is unresponsive if the database size is huge.

Note: The publication of the python package to PyPi has been delayed and will be completed as soon as possible.

2021-09-09 — pgAdmin 4 v5.7 Released

The pgAdmin Development Team are pleased to announce pgAdmin 4 version 5.7. This release of pgAdmin 4 includes 26 bug fixes and new features. For more details please see the release notes.

Notable changes in this release include:

Features:

  • Added support for the truncate table with restart identity.
  • Added database and server information on the Maintenance process watcher dialog..
  • Allow the referenced table to be the same as the local table in one to many relationship for ERD Tool..
  • Make closing tabs to be smarter by focusing on the appropriate tab when the user closed a tab..
  • Set PSQLRC and PSQL_HISTORY env vars to apt. user storage path in the server mode..

Bugs/Housekeeping:

  • Fixed blank screen issue on windows and also made changes to use NWjs manifest for remembering window size.
  • Ensure that trigger function SQL should have ‘create or replace function’ instead of ‘create function’ only.
  • Fixed the export image issue where relation lines are over the nodes.
  • Fixed width limitation issue in PSQL tool window.
  • Fixed an issue where columns with sequences get altered unnecessarily with a schema diff tool.
  • Ensure that the lock panel should not be blocked for larger records.
  • Fixed an issue where whitespace in function bodies was not applied while generating the script using Schema Diff.
  • Introduced the OAUTH2_SCOPE variable for the Oauth2 scope configuration.
  • Enables pgAdmin to retrieve user permissions in case of nested roles, which helps to terminate the session for AWS RDS.
  • Ensure that pgAdmin should not fail at login due to a special character in the hostname.
Читайте также:  Setup � usb ��� linux

2021-08-12 — pgAdmin 4 v5.6 Released

The pgAdmin Development Team are pleased to announce pgAdmin 4 version 5.6. This release of pgAdmin 4 includes 14 bug fixes and new features. For more details please see the release notes.

Notable changes in this release include:

Features:

    Added support to copy SQL from main window to query tool.

This feature is used to copy the SQL script for the selected browser tree node in the query tool. For this we have added new preferences setting ‘Copy SQL from main window to query tool?’

Added support for formatted JSON viewer/editor when interacting with data in a JSON column.

This feature allows the user to format, view and edit JSON data in a very nice way. JSON editors have so many formats to view data differently.

Bugs/Housekeeping:

  • Rename the «Resize by data?» to «Columns sized by» and disabled the ‘Maximum column width’ button if ‘Columns sized by’ is set to ‘Column data’.
  • Ensure that the login account should be locked after N number of attempts. N is configurable using the ‘MAX_LOGIN_ATTEMPTS’ parameter.
  • Fixed CSRF errors for stale sessions by increasing the session expiration time for desktop mode.
  • Fixed an issue in the search object when searching in ‘all types’ or ‘subscription’ if the user doesn’t have access to the subscription.
  • Fixed an issue where paste was not working through the Right-Click option on PSQL.
  • Fixed TypeError ‘NoneType’ object is not sub scriptable.
  • Fixed an issue where the titles in query tabs are different.
  • Fixed dashboard server activity issue when active_since parameter is None.

2021-07-15 — pgAdmin 4 v5.5 Released

The pgAdmin Development Team are pleased to announce pgAdmin 4 version 5.5. This release of pgAdmin 4 includes 18 bug fixes and new features. For more details please see the release notes.

Notable changes in this release include:

Features:

    Highlighted long running queries on the dashboards

This feature is implemented to highlight the long running queries. It allows the user to provide the warning and alert threshold values in minutes. Depending on the threshold value pgAdmin4 highlights the long running queries on the Dashboard.

Added support for Reassign/Drop Owned for login roles.

This feature allows the user to change the ownership of database objects owned by a database role or remove database objects owned by a database role.

Added support for OAuth 2 authentication

This feature allows the user to connect to the pgAdmin 4 server using OAuth2 authentication. To enable OAUTH2 authentication for pgAdmin, you must configure the OAUTH2 settings in the config_local.py or config_system.py file.

  • Added option to provide maximum width of the column when ‘Resize by data?’ option in the preferences is set to True
  • Do not block the query editor window when running a query
  • Bugs/Housekeeping:

    • Ensure that the Data Output panel can be snapped back after it is detached.
    • Fixed replace keyboard shortcut issue in the query tool on the normal keyboard layout.
    • Remove leading whitespace and replace it with ‘[. ] ‘ in the Query Tool data grid so cells don’t look empty.
    • Fixed an issue in the search object when searching in ‘all types’ or ‘subscription’ if the user doesn’t have access to the subscription.
    • Fixed an issue where the New Connection Drop Down has lost default maintenance database, auto-select, and tab-through functionality..
    • Ensure that setting ‘Open in new browser tab’ should be visible, it should not be based on the value of ‘ENABLE_PSQL’.
    • Disable email deliverability check that was introduced in flask-security-too by default to maintain backwards compatibility.
    • Fixed an issue where incorrect column names were listed in the properties of Index.

    2019-11-21 — Try pgAdmin online!

    Our friends at EnterpriseDB have kindly made an online demo environment for pgAdmin available to allow new users to try it out in their browser without needing to download or install any software. The environment (based on the Katacoda learning platform) includes pgAdmin and PostgreSQL 12, preloaded with the pagila sample database, and is unique to every user allowing a far better experience than typical shared demo environments.

    Читайте также:  Как поставить windows планшет

    2018-07-12 — pgAgent v4.0.0 Released

    The pgAdmin Development Team are pleased to announce the release of pgAgent v4.0.0.

    pgAgent is a job scheduler for PostgreSQL; for more information please see the documentation included as part of the pgAdmin documentation at https://www.pgadmin.org/docs/pgadmin4/3.x/pgagent.html.

    We expect DEB and RPM packages to be available from the PostgreSQL APT/YUM repositories in due course, as well as an updated installer from EnterpriseDB available through StackBuilder.

    Notable changes in this release include:

    • Remove the dependency on wxWidgets. pgAgent now uses Boost for thread management and synchronisation [Neel Patel]
    • Refactor connection parsing logic to fix issues with and improve handling of connection strings [Thomas Krennwallner]
    • Handle 2 digit server version numbers [Ashesh Vashi]
    • Fix handling of the «succeeded» flag on job steps which could prevent failure of steps causing the following steps to fail [Sanket Mehta]

    Источник

    Топ инструментов разработки для PostgreSQL

    Конференция PG Day Russia растет и масштабируется: этим летом мы готовим для вас доклады и тренинги по всем наиболее популярным базам данных, а также по администрированию и хранению данных. в рамках подготовки мы запустили корпоративный блог, где планируем делиться ценной информацией о происходящем в мире баз данных. Первый пост посвящен инструментам разработки для PostgreSQL, его автор varanio будет рад ответить на ваши вопросы и комментарии!

    Я поспрашивал различных людей, имеющих отношение к PostgreSQL, что они используют в реальной жизни для разработки приложений, использующих PG.

    Это, конечно, не строго математическая выборка, но тем не менее получился некоторый список инструментов на слуху, которые достойны того, чтобы их «пощупать», что я и собираюсь сделать в этой статье.

    Если вашего инструмента нет в списке, или у вас просто есть что сказать, добро пожаловать в комментарии.

    Итак, вот неформальный топ и субъективное описание.

    На первом месте psql, и это неудивительно. Надежный как автомат калашникова, бесплатный, стоит из коробки, что еще надо для счастья? Для редактирования запросов используется редактор, указанный в переменной окружения EDITOR, обычно ставят vim, nano или что-то в этом духе. Ну и вообще, psql — это unix-way, т.е. можно его запускать со своим редактором, своим пейджером для отображения результатов, ему можно на вход подавать sql-запрос через пайп, и вывод направлять куда надо.

    Из минусов можно отметить слабенький автокомплит, а также то, что приходится заучивать неинтуитивные команды из серии \d \dt+ \sf и т.д. (впрочем, все описания команд доступны через команду \? )

    Ну, и работа в консоли и в виме — это не всех устраивает почему-то 🙂

    На самом деле, иногда хочется иметь где-нибудь слева полный список таблиц/вьюх и иметь возможность щелкнуть мышкой по нужной, чтобы посмотреть, что там вообще. Т.е. хоть какой-то GUI. Работа в psql хоть и эффективна, но напоминает работу в темной комнате с маленьким фонариком, освещающим лишь только один объект за раз.

    datagrip

    IDE для баз. Несмотря на то, что продукт относительно свежий, он уже используется повсеместно. В основном за счет того, что сразу встроен в мегапопулярные продукты от компании JetBrains: IntelliJ IDEA, PyCharm, PhpStorm и т.д.

    Собственно, эта его встроенность одновременно является и главной киллер-фичей продукта: вы редактируете, например, php-код, в котором есть строка с sql-запросом, и внезапно понимаете, что IDE вам подсказывает (прямо в вашем коде) синтаксис SQL, названия таблиц и их полей, подчеркивает красненьким, если что-то написано не так, форматирует SQL и многое-многое другое. Конечно, в этом же IDE можно делать и то, что умеют другие GUI для баз: просматривать списки таблиц и других сущностей, отдельно делать запросы, экспорт таблиц в разные форматы и многое другое.

    Из особенностей я бы отметил следующие вещи:

    • можно выделить несколько insert’ов и нажать «Edit as table» (см. картинку). После чего отредактировать это в удобном табличном виде вместо sql-синтаксиса, причем там же можно добавлять строки, колонки, экспортировать в csv и т.д.
    • Можно сравнивать результаты двух запросов. Это полезно, когда пытаешься упростить сложный запрос, и при этом ничего не сломать.
    • встроенность в код проработана не до конца. К примеру, при переименовывании в каком-либо интерфейсе колонки таблицы, IDE не находит нужные строки с SQL в коде (при этом автокомплит в этих строках работал), и наоборот, находит какую-то чушь.
    • Визуальной разработки не очень много. Т.е. вы можете сделать таблицу, но view уже не можете. Если таблица содержит какие-то id с foreign key (допустим, ссылка на некий словарь), хотелось бы при в вводе данных в таблицу выбирать значения из словаря, а не вбивать айдишки.
    • Если посмотреть таблицу в какой-нибудь из схем, то Datagrip посылает запрос set search_path = имясхемы, что приводит к плохим последствиям, если используется pgbouncer (а он используется почти всегда в случае с php или когда много серверов), так что для dev-разработки лучше использовать разные подключения: для работы кода — через pgbouncer, для ide — напрямую к базе.
    Читайте также:  Мышь apple не работает прокрутка windows

    Datagrip активно развивается, в частности, исправлены некоторые раздражающие баги с подсветкой синтаксиса.

    В целом хороший современный инструмент, рекомендую.

    pgAdmin

    Им многие пользуются, но, скорее по привычке. Или потому что это бесплатно. pgAdmin4 — продукт странноватый, при этом в описании сказано, что это самый лучший опенсорс продукт для разработки и администрирования.

    Как его использовать для администрирования — не очень понятно. pgAdmin’ом нельзя «заинитить» новый сервер, нельзя подправить pg_hba.conf или postgresql.conf. Видимо, имеются в виду скудные графики запросов в секунду, вывод подробностей конфигурации сервера и статистика в таблицах. Не уверен, в общем. Как вы испольуете pgAdmin для администрирования?

    Как его использовать с точки зрения разработки — еще менее понятно. Субъективно, интерфейс в целом не удобен для разработки. Несмотря на то, что четвертую версию переписали на python + JS с jQuery, по сути, осталось всё то же самое.

    Чтобы немного пояснить ситуацию, в голове разработчика такая картина: есть база на каком-то серваке, в ней — схемы, в схемах — таблицы и вьюхи. Т.е. таблица — максимум, 3-й уровень. А если база одна, то вообще второй уровень. Ткнул по таблице — увидел несколько первых строк.

    В голове разработчика pgAdmin как-то так: «Смерть Кощеева на конце иглы, та игла в яйце, то яйцо в утке, та утка в зайце, тот заяц в сундуке, а сундук стоит на высоком дубу, и то дерево Кощей как свой глаз бережёт», а именно (см. картинку):

    Есть группа серверов, в ней есть сервер, на сервере существуют базы, роли и т.д., из баз можно выбрать конкретную базу, в ней видно схемы, языки, еще бог знает что. В схемах можно выбрать нужную схему, в схеме 100500 всего, и где-то в конце списка «таблицы». В таблицах можно выбрать нужную таблицу, по ней надо кликнуть правой кнопкой мыши, там в большом списке выбираешь «view data», в этой «view data» есть «view first 100 rows» и уже там наконец-то смерть кощеева несколько строк для ознакомления.

    Киллер-фичей pgAdmin является возможность дебажить хранимые процедуры pl/pgsql. Других бесплатных программ с этой возможностью я не встречал.

    EMS Studio

    EMS Studio, похоже, работает только под Windows. Это его главный недостаток, потому что, как известно PostgreSQL очень редко используют под виндой.

    Я этот софт посмотрел только один раз под Wine, поэтому могу ошибаться, но вообще мне жутко не понравилось. Бешенное нагромождение непонятных иконок, невнятный интерфейс. Кстати, у меня под Wine заглючили всплывающие подсказки, и я играл в «угадай функциональность по картинке». Очень тяжело.

    До кучи там зачем-то сделан визуальный конструктор запросов. Где вместо того, чтобы текстом написать where >, надо нажать мышкой несколько кнопок и понавыбирать из выпадающего списка. Тем, кто знает SQL — это не нужно, тем кто не знает — это не поможет.

    Фичи, которые называют как удобные: auto-complete с алиасами, экспорт результата выполнения запроса в SQL формате (insert), удобный GUI для экпорта базы, возможность выполнять только выделенную часть SQL.

    Умеет дебаг pl/pgsql. В общем, много чего умеет, но какой-то выдающейся особенности, что отличало бы от других, я не могу назвать.

    Navicat — это, наверное, самая богатая фичами программа. Она умеет всё, что умеют другие GUI для БД: дизайнер объектов, просмотрщик таблиц, автокомплит, инструменты проектирования базы, отладка pl/pgsql, импорт/экспорт и так далее.

    Поистине всеобъемлющий софт, который работает практически на любой ОС. Навскидку, намного удобнее EMS Studio.

    Киллер-фичей, на мой взгляд, является сравнение баз. Т.е. можно взять две базы, узнать, чем они отличаются по структуре и сформировать запросы для синхронизации.

    Ценник, правда, что называется, «конский» — в два раза дороже, чем EMS. Но тут, похоже, это полностью оправдано.

    PGCLI

    Те, кто пробует работать с psql, сразу начинают мечтать о более богатом функционале, например, автодополнении. Для реализации этих хотелок существует pgcli.

    pgcli умеет автодополнять ключевые слова, функции, таблицы, колонки, колонки в алисах. Умеет подсвечивать синтаксис, редактировать SQL в многострочном режиме без отдельного редактора и т.д.

    Короче, pgcli — это, по сути, psql на стероидах.

    phppgadmin

    Многие из тех, кто перешел с MySQL, инстинктивно ищут аналоги phpmyadmin, и натыкаются на phppgadmin. К сожалению, phppgadmin не развивается уже несколько лет, так что о мертвых или хорошо, или ничего. В общем, промолчим, пожалуй.

    Не по всем из этих инструментов у меня есть опыт использования, поэтому прошу высказаться в комментариях. Что используете вы?

    Также надо отметить, что на конференцию pgday приедут разработчики популярных инструментов не только для постгреса, но и других бд, можно будет их помучать вопросами и высказать какие-то пожелания по фичам. В любом случае, приглашаем всех посетить это полезнейшее мероприятие, которое пройдет в Санкт-Петербурге 5-7 июля!

    Источник

    Оцените статью