pgAdmin

Postgresql can't connect application server through PGAdmin4

南楼画角 提交于 2019-12-18 12:34:10
问题 I installed PostgreSql on my Windows machine. I can connect to PostgreSql through cmd. But when I want to launch pgAdmin I am getting this error message. Failed to connect to the pgAdmin application server. Click here to try again. I have also Mysql installed on my machine if it can make any complications. 回答1: The same problem happened to me today: And this is how I've solved it: 1) Use a text editor to open the config_distro.py file under the c:\Program Files\pgAdmin 4\v1\web folder. Change

Export and import table dump (.sql) using pgAdmin

流过昼夜 提交于 2019-12-18 09:57:19
问题 I have pgAdmin version 1.16.1 So, for exporting table dumm I do: Right click on table, then in menu click on backup , then in Format choice Plain and save file as some_name.sql Then I remove table. Ok, now I need import table backup some_name.sql into database. How to do this? I can't find how to import table's .sql dump into database using pgAdmin. Can you help me please? 回答1: In pgAdmin, select the required target scheme in object tree Click on Plugins/PSQL Console Write \i /path/to

将PostgreSQL的PL / pgSQL输出保存到CSV文件

好久不见. 提交于 2019-12-17 18:20:20
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 将PL / pgSQL输出从PostgreSQL数据库保存到CSV文件的最简单方法是什么? 我将PostgreSQL 8.4与pgAdmin III和PSQL插件一起使用,从中运行查询。 #1楼 在终端中(连接到数据库时)将输出设置为cvs文件 1)将字段分隔符设置为 ',' : \f ',' 2)设置输出格式不对齐: \a 3)仅显示元组: \t 4)设置输出: \o '/tmp/yourOutputFile.csv' 5)执行查询: :select * from YOUR_TABLE 6)输出: \o 然后,您将可以在以下位置找到您的csv文件: cd /tmp 使用 scp 命令将其复制或使用nano进行编辑: nano /tmp/yourOutputFile.csv #2楼 有几种解决方案: 1个 psql 命令 psql -d dbname -t -A -F"," -c "select * from users" > output.csv 这具有很大的优势,您可以通过SSH使用它,例如 ssh postgres @host command -使您能够 2 postgres copy 命令 COPY (SELECT * from users) To '/tmp/output.csv' With CSV;

使用已编译PostgreSQL二进制包编译mysql_fdw

你说的曾经没有我的故事 提交于 2019-12-17 17:39:47
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 上周写的帖子: 为PostgreSQL编译Windows下的mysql_fdw 还是有人不会,所以再写一篇用二进制包编译。 1、下载 PostgreSQL 二进制包: Download PostgreSQL Binaries ,点击 下载。 这是EnterpriseDB公司下载地址,不用担心我编译的版本有木马。 (真有人不放心,出门在外有戒心不是坏事,不用就是,EDB的总能放心用吧。) 文件名是postgresql-11.4-2-windows-x64-binaries.zip,包看起来很大是因为包含pgAdmin4以及Python环境。 解压之后我把它们放在目录:C:\postgresql-11.4-2-bin 不是好习惯,主要是为了省事,而且我的虚拟机只有一个C盘。 2、克隆 mysql_fdw 源代码 这个不需要再细说,假设放在 C:\mysql_fdw 目录。 3、安装 MySQL 开发用客户端 跟以前操作一样,假设放在 C:\MySQL\6.1 目录。 4、下载 mysql_fdw.sln、mysql_fdw.vcxproj、MYSQL_FDW.def 这三个文件放到 C:\mysql_fdw 下。 如果是不熟悉VC++,建议跟上边使用相同的目录名,不用修改。 用 百度云盘 分享,过段时间可能会失效

PostgreSQL how to see which queries have run

久未见 提交于 2019-12-17 15:38:16
问题 I have a PostgreSQL DB at my computer and I have an application that runs queries on it. How can I see which queries has run on my DB? I use a Linux computer and pgadmin. 回答1: Turn on the server log: log_statement = all This will log every call to the database server. I would not use log_statement = all on a production server. Produces huge log files. The manual about logging-parameters: log_statement ( enum ) Controls which SQL statements are logged. Valid values are none (off), ddl , mod ,

Create an ER diagram in pgAdmin [closed]

 ̄綄美尐妖づ 提交于 2019-12-17 10:38:25
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . What would be the step by step walk-through for building a basic Entity-Relationship Diagram from pgAdmin? Would there be some plugins for doing that in pgAdmin? Note: I searched in the web but other than stumbling upon an exhausting list of softwares (most of them not freeware or out-of-date) I wind up here

incomplete information from query on pg_views [duplicate]

时光毁灭记忆、已成空白 提交于 2019-12-17 06:56:15
问题 This question already has answers here : pgAdmin: How to see complete value in a cell in output (1 answer) pgAdmin III faulty behavior? (2 answers) Closed 2 years ago . I have a view in my database ( PostgreSQL ) and I would like to see it's code. I wrote this query: select definition from pg_views where viewname='x' this works most of the time, However in some of the views when the select code is long I get at some point (...) for example this is one of the results of query where it shows (.

Ident authentication failed error when connecting to PostgreSQL via PgAdmin III

烈酒焚心 提交于 2019-12-12 19:14:32
问题 I'm trying to connect to my postgres server instance using PgAdmin III from the same machine the instance is on, but I keep getting the "Ident authentication failed" error when trying to connect. Here the steps I formed performed to try to achieve connectivity: I created a new user in Postgres called 'pguser1': user pguser1 I modified my pg_hba.conf file in order to use md5 authentication: pg_hba.conf with md5 auth I then tried to connect via pgAdminIII, but I've had no success. What am I

couldn't get a connection to the database - Postgres Job Scheduling issued (Windows based machine)

假装没事ソ 提交于 2019-12-12 17:08:18
问题 I search in the internet about this issue. But couldn't find a proper answer. This link is bit closer to the solution, but it is not worked for me. I scheduled a job in pgadmin. but the job is always got failed due to "couldn't get a connection to the database" error. When creating a job using PGAdmin, initially it is asked name, job class, host agent etc... In first stage I left blank for the field "Host Agent". (My schedule works in every minute) PGAdmin right side panel has a tab called

PostgreSQL - How to see Function Text/Source in pgAdmin?

元气小坏坏 提交于 2019-12-12 10:59:17
问题 I want to be able to SELECT the code of a Function. When I try this Query: select prosrc from pg_proc where proname = 'my_proc' I get an empty column. The thing is, it seems column prosrc does hold the function text. When I try this Query: select proname from pg_proc where prosrc ~* 'part of Function text' I get the correct number and names of Functions. It just doesn't display prosrc. Any idea? PostgreSQL 8.2. pgAdmin III 1.12.2. Thanks. 回答1: I ran into this as well using pgAdmin III on