Giter Site home page Giter Site logo

pgweb's Introduction

pgweb

Web-based PostgreSQL database browser written in Go.

Build Status

Overview

This is a web-based browser for PostgreSQL database server. Its written in Go and works on Mac OSX, Linux and Windows machines. Main idea behind using Go for the backend is to utilize language's ability for cross-compile source code for multiple platforms. This project is an attempt to create a very simple and portable application to work with PostgreSQL databases.

Features:

  • Connect to local or remote server
  • Browse tables and table rows
  • Get table details: structure, size, indices, row count
  • Execute SQL query and run analyze on it
  • Export query results to CSV
  • View query history

Installation

Please visit Github Releases to download a precompiled binary for your operating system.

Currently supported:

  • Mac OSX 64bit
  • Linux 32/64bit
  • Windows 32/64bit

Supported PostgreSQL versions:

  • 9.1
  • 9.2
  • 9.3

Older versions of PostgreSQL might also work but this project is not tested on 8.x branches.

Usage

Start server:

pgweb --host localhost --user myuser --db mydb

You can also specify a connection URI instead of individual flags:

pgweb --url postgres://user:password@host:port/database

It works great with Heroku Postgres if you need to troubleshoot production database or simply run a few queries.

Full CLI options:

Usage:
  pgweb [OPTIONS]

Application Options:
  -v, --version    Print version
  -d, --debug      Enable debugging mode (false)
      --url=       Database connection string
      --host=      Server hostname or IP (localhost)
      --port=      Server port (5432)
      --user=      Database user (postgres)
      --pass=      Password for user
      --db=        Database name (postgres)
      --ssl=       SSL option (disable)
      --bind=      HTTP server host (localhost)
      --listen=    HTTP server listen port (8080)
      --auth-user= HTTP basic auth user
      --auth-pass= HTTP basic auth password
  -s, --skip-open  Skip browser open on start

Compile from source

Go 1.3+ is required. You can install Go with homebrew:

brew install go

To compile source code run the following command:

make setup
make dev

This will produce pgweb binary in the current directory.

There's also a task to compile binaries for other operating systems:

make build

Under the hood it uses gox. Compiled binaries will be stored into ./bin directory.

Contributors

License

The MIT License (MIT)

Copyright (c) 2014 Dan Sosedoff, [email protected]

pgweb's People

Contributors

sosedoff avatar cbandy avatar jartek avatar davetoxa avatar chancez avatar catsby avatar stevencothren avatar dmnlk avatar

Watchers

James Cloos avatar shigang.gao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.