I have a very basic PostgreSql table. Despite the simple table schema, I cannot query it via PgAdmin4.
The View Data
option is unresponsive; Query Tool
option becomes unresponsive after a few attempts in opening and closing the panel. When the Query Tool is eventually (somehow) launched, a trivial SQL statement like
SELECT * FROM test_table
will spin forever and never display.
The diagram above shows the exact same table, which is okay under PgAdmin3.
The table was created empty. Then added with a row. But it threw errors about not having a Primary Key. Which also threw errors when I tried to set a Primary Key. So I used TeamPostgreSql to set a Primary Key. So all is good under PgAdmin3 now. Hence I'm really curious about what's going on with PgAdmin4?
You can access the Query Tool via the Query Tool menu option on the Tools menu, or through the context menu of select nodes of the Browser tree control.
To view or modify data, right click on a table or view name in the Browser tree control. When the context menu opens, use the View/Edit Data menu to specify the number of rows you would like to display in the editor panel. To modify the content of a table, each row in the table must be uniquely identifiable.
I'm running pgAdmin4 v3.0 and I've put localhost
as host name.
I mean, left panel > servers > create > server
and then connection tab > host name
I could not query tables, clicking on view/edit data
> all rows
had no results (nor error log entries).
After I changed server name from localhost
to 127.0.0.1
, all worked as expected!
I hope it helps, because I've lost so much time on this and could not find a proper answer.
I find a way to view query result on Data Output window using the "Reset Layout" command from File menu. Save your current work (query) before as it will kind of restart pgAdmin4. Tested with pgAdmin 2.1
1) First delete the log file to get rid of older logs
2) Start pgAdmin4.
3) Try to view data again
Can you check log file for any errors & paste it here?
Linux log location: ~/.pgadmin/pgadmin4.log
Windows log location: C:\Users\YOUR_USERNAME\AppData\Roaming\pgAdmin\pgadmin4.log
Try naming your columns with lower case letters.
Or try with a blank query and write the SQL commands manually:
SELECT * FROM “test_table”
ORDER BY “Apple” ASC
I think this is a bug. The command the pgAdmin 4 is sending, does not contain the double quotes in the order command on the column name, and if you have upper case letters, SQL is going to convert them to lower case letters, thus not finding the sorting criteria.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With