Hacker News new | past | comments | ask | show | jobs | submit login
Pgweb: Web-based PostgreSQL database browser written in Go (github.com)
209 points by sinak on Oct 27, 2014 | hide | past | web | favorite | 43 comments



For some reason I was having difficulty getting it to connect to our internal servers, though I could connect to one on my local machine. I'm guessing ssl related. In any event, definitely pretty neat, though it wouldn't really replace my standard database interface.

Which brings up the question -- most database tools I've used for ad-hoc queries have been mediocre at best. psql isn't bad, but a text based interface is suboptimal in many cases. On the other hand, SquirrelSQL, which I generally use, is adequate though not particularly friendly.

What I'd really love is a UI with some modern sensibilities, like saving all queries in history and providing Sublime Text like cmd-P commands to quickly recall and re-run queries. Auto-limiting, quick scrolling through query history with arrow keys, templated queries/ handling bind params, nice key mappings, SQL formatting, etc...

When I was using Oracle, Toad provided some of the above, but it was pretty bloated and provided way more than what I really needed. Tried navicat and it ate 100% of my CPU and crashed repeatedly. I'd be curious if there are any better (free or cheap) alternatives out there, but most of the offerings I've seen look pretty weak.


Vim users might consider the dbext plugin: http://vim.sourceforge.net/scripts/script.php?script_id=356

It supports a long list of databases, a variety of common development languages, has a command history, prompts for variables in statements, and more features I haven't touched. As a Vim plugin, it's fairly light on the CPU, but with all the expressive power you expect from Vim (including syntax formatting/highlighting and the availability of your other favorite plugins). I like it because I can dedicate a plaintext file to a specific task, develop my queries, save my results, and come back to it at a later date if the need arises. Some of these files are an important part of my workflow. The only thing I'd change is a more secure handling of login credentials, but it sure beats the standard command line tools bundled with most databases and requires less overhead than the GUI or web-based ones.


This is just a start, there're lots of features in roadmap (not in repo yet). Im trying to model pgweb after Sequel Pro (http://www.sequelpro.com/), which is MySQL and OSX only. Some of the features you mentioned will be available in upcoming releases.


Modelling it of Sequel Pro? Now you have my attention... Sequel is easily one of the nicest DBA tools I've used, however it's limitation of being MySQL-only means I get frustrated when having to rely on other, lesser tools for Postgres.


Same here, that's the reason why pgweb was created.


Can't we give a lot of money to the guy who made Sequel Pro to make a PG version?


I'm a former Sequel Pro developer and I wrote a Postgres client for OS X: https://eggerapps.at/pgcommander/

I'm currently working on version 2.0 which includes a table structure editor: https://eggerapps.at/pgcommander-prerelease/


For us, better support for editing hstore and json/jsonb values is a must. Add that and we might become customers.


This is on my roadmap for next year. Drop me a line at jakob@eggerapps.at and I'll send you a note once it's ready.


If you're looking for a general JSON editor - there's a nice online one at: https://json-csv.com/editor


So great! Is there a way to register (i.e. pay) for v1 and get v2 when it comes out?


Yes! All v1 licenses bought on my website after September 1st will be valid for v2. See https://eggerapps.at/pgcommander/faq.html


I'm currently using IntelliJs database interface to access PostgreSQL but I would definitely pay for something similar like SequelPro for Postgres.


IDEA has some pretty slick database features, including some of the things you mentioned: https://www.jetbrains.com/idea/features/database_tools.html

Only in the Ultimate edition though, so quite pricey..


0xDBE is really nice: https://www.jetbrains.com/dbe/ Though it's still in alpha.


I use it a lot, it's great for schema & queries but I don't really like it for data manipulation & export though, a bit cumbersome for my taste.


Aqua Data Studio (http://www.aquafold.com/) is pretty awesome, and does most of the above. It's far from cheap, unless you're comparing it to Toad. It connects to pretty much anything with a jdbc driver, and provides a relatively uniform interface - I use it regularly with postgres, mssql, oracle and teradata.

Tora is free, and open source, but a bit rough around the edges.


Aquadata looks like a very interesting application, I'm often surprised that there's so much support for database ddl and querying, but not so much support for actually doing something more with the data, like graphing and other visualisations.

And to plug my own little endeavour :-) if you're on Linux and are looking for a quick and easy to use Forms builder, here's my early beta http://www.data-forms-action.com/

Supports MySQL and Postgres currently.


If you are looking for sql graphing check out http://www.sqldashboards.com/ It supports MS-SQL, MySQL, Postgres and allows creating live interactive charts directly from SQL queries. There's also a command line interface for generating static .png images. Disclaimer: I make the software


TeamPostgreSQL is a web based Postgres interface with many of the features you mentioned. http://www.teampostgresql.com


pl/sql developer is really great on Oracle and more stripped down and developer focused than toad. SSMS for sqlserver I find really good for some stuff and fairly awful for some other stuff (editting data)


This was a good post from a few years ago on HN with tips on working with PostgreSQL via the command line (and your favorite text editor): https://news.ycombinator.com/item?id=5214072


This is really great. It was a fun read. Although I'm wondering why the routing table definition in startServer() here(https://github.com/sosedoff/pgweb/blob/master/main.go#L85) isn't closer to the api.go module. Is this a gin convention or just personal taste?


Author here. Im still new to Go language and the way pgweb is structured is not the best, but it works for now. Pull requests are always welcome!


Does anybody have this wrong feeling about importing modules from some 3rd party URL (github.com in this case). I mean, if it is a one shot script, fine. But, don't you plan this software to live 5 or 10 years after publishing?

E.g. imagine if phpMyAdmin had some critical imports from geocities.com...

I see it is common in Golang, so somebody please explain why don't you feel wrong about this.


You download and install the source locally. The import statement shows github.com because that is the local path into the local src directory. Using github.com in the local path is the suggested naming convention.

You have the code so worse case you update it yourself.


With go, you should absolutely vendor your dependencies. Unfortunately, the tutorials and docs on their site do not point that out strongly enough, I guess a lot of beginners will be bitten by this in the future.


I think the reasoning is that it's development, and in a very rapidly evolving ecosystem. Once you ship a product you should obviously bundle and maintain the libraries you use with something like docker.


There is also pgstudio/Postgresql-Studio which is run as a standalone jar file on your desktop (java -jar jetty-runner-9.0.6.v20130930.jar pgstudio.war)

http://www.postgresqlstudio.org/about/features/


I've never really understood why standalone webapps like these aren't more popular.

I haven't used this one in particular


I notice you have to pass a username when starting the server. Is there no way to require username/password from a database user when they access the site?


Currently no, but ability to specify connection settings from web interface will be implemented. Its one of the items on todo list.


Awesome. I look forward to it! Keep up the good work


My solution is to use Adminer [1] and running it via `php -S localhost:8080 adminer.php` works beautifully. Many other databases supported also. Not affiliated, just a happy user.

[1]: http://www.adminer.org/


Looks a bit similar to what Datazenit [0] is offering, another simple way to browse a database.

[0] http://datazenit.com/


That looks cool, similar to https://www.jackdb.com/


An Inline Edit will be really handy .. something like http://www.sequelpro.com/


Did you mean column value inline edit? If so, yes, thats going to be implemented at some point.


Is there any similar oracle client available ?


What about hstore support?


very nice. I currently use pgadmin III. How does this compare?


pgweb is pretty new, so it wont have all features that pgadmin offers, but at least you dont have to install any dependencies. check github readme for feature list.


mysql version :P plz ? haha.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: