pgAdmin

Fedora 31

女生的网名这么多〃 提交于 2020-02-27 03:43:35
参考 指南 安装pgadmin4时,发现下载网速很慢,卡在 pgadmin4-docs-4.18-1.f31.noarch.rpm 国内镜像: http://mirrors.zju.edu.cn/postgresql/repos/yum/12/fedora/fedora-31-x86_64/ 下载rpm包手动安装 sudo rpm -Uvh pgadmin4-docs-4.18-1.f31.noarch.rpm sudo dnf -y install pgadmin4 配置SELinux sudo setsebool -P httpd_can_network_connect 1 来源: oschina 链接: https://my.oschina.net/wffger/blog/3164077

Postgresql:用户“ postgres”的密码身份验证失败

时光毁灭记忆、已成空白 提交于 2020-02-26 10:41:07
我已经安装了PostgreSQL 8.4,Postgres客户端和Pgadmin3。控制台客户端和Pgadmin的用户“ postgres”的身份验证失败。 我已经输入了用户“ postgres”和密码“ postgres”,因为它以前可以工作。 但是现在身份验证失败。 我之前几次都没​​有出现此问题。 我该怎么办? 那会发生什么呢? psql -U postgres -h localhost -W Password for user postgres: psql: FATAL: password authentication failed for user "postgres" FATAL: password authentication failed for user "postgres" #1楼 工作人员的回答是正确的,但是如果您想进一步自动化,可以这样做: $ sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';" 做完了! 您保存了用户= postgres和密码= postgres。 如果您没有User postgres ubuntu的密码,请执行以下操作: $ sudo passwd postgres #2楼 如果您尝试以postgres用户身份登录postgres shell

Fedora 31

佐手、 提交于 2020-02-26 02:37:59
参考 How To Install PostgreSQL 12 on Fedora 31/30/29 安装 sudo dnf install -y bash-completion wget sudo dnf update -y #sudo reboot sudo dnf install https://download.postgresql.org/pub/repos/yum/reporpms/F-31-x86_64/pgdg-fedora-repo-latest.noarch.rpm sudo dnf install postgresql12-server postgresql12 sudo /usr/pgsql-12/bin/postgresql-12-setup initdb sudo systemctl enable --now postgresql-12 systemctl status postgresql-12 #sudo firewall-cmd --add-service=postgresql --permanent #sudo firewall-cmd --reload 修改配置及重启服务 $ sudo gedit /var/lib/pgsql/12/data/postgresql.conf listen_addresses = '*' $ sudo gedit

Can't query data on pgAdmin 4 but it works using psql and Python

北城以北 提交于 2020-02-07 02:29:45
问题 I have created a postgresql database on rds and I can connect and query it using psql on terminal or sqlalchemy on Python. When using pgAdmin4 I can't query or visualize the data but can create/alter tables, import data, ... I have also tried connecting it to Metabase and DBeaver but the connection times out. Any ideas why this is happening? I have also connected the database using pgAdmin3 and was able to visualize the data and query it, but since I am using postgresql 11.4 it is not fully

Can't query data on pgAdmin 4 but it works using psql and Python

巧了我就是萌 提交于 2020-02-07 02:28:55
问题 I have created a postgresql database on rds and I can connect and query it using psql on terminal or sqlalchemy on Python. When using pgAdmin4 I can't query or visualize the data but can create/alter tables, import data, ... I have also tried connecting it to Metabase and DBeaver but the connection times out. Any ideas why this is happening? I have also connected the database using pgAdmin3 and was able to visualize the data and query it, but since I am using postgresql 11.4 it is not fully

plpgsql Select statement in For loop to create multiple CSV files

无人久伴 提交于 2020-01-24 07:02:07
问题 I would like to repeat the following query 8760 times, replacing ‘2’ with 1 to 8760 for every hour in the year. The idea is to create a separate CSV file for each hour for further processing. COPY (SELECT * FROM public.completedsolarirad2012 WHERE completedsolarirad2012."UniquetmstmpID" = 2) TO 'C:\temp\2012hour2.csv' WITH DELIMITER ',' CSV HEADER I have put together the following function (testing with only a few hours): CREATE OR REPLACE FUNCTION everyhour() RETURNS void AS $BODY$BEGIN FOR

pgAdmin: How to see complete value in a cell in output

让人想犯罪 __ 提交于 2020-01-21 12:55:15
问题 I have a query which gives me the large output value in the output cell. But the problem is that for reading I need to drag the column and see the value and after some range the values are not displaying instead it's showing me (...) . After copying the value also I am unable to get the whole set of value. Question : How can I see the whole set of value from the output? 回答1: There is a setting for that in the options: Max characters per column - useful when dealing with big columns. Details:

How should I import data from CSV into a Postgres table using pgAdmin 3?

跟風遠走 提交于 2020-01-18 21:32:29
问题 Is there any plugin or library which I need to use for this? I want to try this on my local system first and then do the same on Heroku Postgresql 回答1: pgAdmin has GUI for data import since 1.16. You have to create your table first and then you can import data easily - just right-click on the table name and click on Import. 回答2: assuming you have a SQL table called mydata - you can load data from a csv file as follows: COPY MYDATA FROM '<PATH>/MYDATA.CSV' CSV HEADER; For more details refer to

How to split data from one column to three columns in another table? SQL

时光毁灭记忆、已成空白 提交于 2020-01-17 04:14:40
问题 I have table (inf) with two columns id_student and hobbies like this: ID_student = 1 Hobbies = "music, cooking, bassguitar" and I want to copy the hobbies by splitting them to another table (hobbies) in three columns which contain the following columns: ID_student hobby1 hobby2 hobby3 1 music cooking bassguitar how could I write something likethat in Postgres? 回答1: There is many ways to do this. One way is using the string_to_array function: INSERT INTO hobbies (id, hobby1, hobby2, hobby3)

PGAdmin: Not connected to the server or the connection to the server has been closed

China☆狼群 提交于 2020-01-13 07:42:26
问题 i got this problem with postgreSQL, when i do a simple query of anything (CRUD), sometimes it works and almost always shows this message: Not connected to the server or the connection to the server has been closed. I don't know how to solve it and it started to irritate me, anyone know how to fix it? UPDATE 1 I have been searching and it seems the pgadmin4 the problem (it seems because it's not 100% developed yet), i have been using pgadmin3 and that error doesn't show up. 回答1: The reason