Code Monkey home page Code Monkey logo

postbird's Introduction

Postbird

Backers on Open Collective Sponsors on Open Collective

Postbird is a cross-platform PostgreSQL GUI client, written in JavaScript, runs with Electron

Connection Screen

Table Content

Table Structure

Download

Version 0.8.4

MacOS: Postbird-0.8.4.dmg - MacOS 10.9+

Linux packages:

Via snap:

sudo snap install postbird

Snap page: https://snapcraft.io/postbird

Windows installer: Postbird.Setup.0.8.4.exe
Windows portable: Postbird-0.8.4-win.zip

Latest artifacts: https://nightly.link/Paxa/postbird/workflows/build/master

Development

Codeship Status for Paxa/postbird Build Status

Pull requests and suggestions are welcome

To run newest version, simply:

git clone [email protected]:Paxa/postbird.git
cd postbird
yarn
yarn start

Build package:

yarn dist
ls ./dist

See CONTRIBUTING.md for more details

Help Project

Your donations will help to publish to app stores, more frequent releases, faster feature requests implementation. Postbird at opencollective: https://opencollective.com/postbird

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Backers

Thank you to all our backers! ๐Ÿ™ [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

postbird's People

Contributors

davidbernal avatar depfu[bot] avatar egallup02360 avatar jzwood avatar kant avatar kastorcode avatar marcuxyz avatar monkeywithacupcake avatar nickheiner-usds avatar nikolasp avatar paxa avatar saylestyler avatar thehollidayinn avatar tzinmein avatar victorbaudot avatar vitaly-t avatar willvincent avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

postbird's Issues

feature: add ability to colorize connections in tabs and on connections screen

This will allow users to understand that the current connection is to:

  • production
  • readonly
  • staging

On the connection screen itself, it can be something like the following (inspired by sequel pro):

https://cl.ly/1H3Q1q340e45

For the tabs, either:

  • the active tab should have the color specified, and inactive tabs should have it as well, though faded out to show that it's not the active tab.
  • there should be a global header that is updated with the current db connection and some presence of that color (not sure what would be aesthetically pleasing).

Add a better release tools

Need to precompile sugar so things (sweet.js and redscript), exclude unused packages, may be optimize with lazy loading and loader object (property getters)

This issue was created in Task Tub

Import SQL. What does it do?

New to postbird. installed and used the File > Import SQL to try to import a little snippet document with a handful of commented out queries that I run often. But after import i seems to have dissapeared. Couldnt find any info on this feature, I forgive me for adding this as an issue. But what happens when using Import SQL?

Show size on disk visually in table list

Inspired by HeidiSQL it would be nice to show the Size on Disk value from table info as a progress bar style in the table listing pane. This helps identifying table sizes quickly, and comparative table sizes.
database

CSV export?

Hi - I love your work and prefer postbird to say PSequel (which is the other tool I left installed after trying at least a dozen). That said, I can't find any CSV export functions - is that somewhere in there or is it something not yet available?

Read-Only Mode

It would be great to have the option to start a connection in read-only mode.

Currently, I call this command after connection, but it's easy to forget to do:

SET SESSION CHARACTERISTICS AS TRANSACTION READ ONLY; 

It may even be better to implement this not as a checkbox, but as a custom query that runs each time you connect.

Hitting spacebar dismiss inline editor modal

Hi, and thanks for the great work !

I think the title says it all. Sometimes there is a need to enter a whitespace in edited field, unfortunately, trying to do so dismisses the edition modal

Connect to SSL database

Hi!

I'm having an issue trying to connect o an SSL enabled postgres database, which does not live locally.

FATAL: no pg_hba.conf entry for host "<IP>", user "<UERNAME>", database "<DBNAME>", SSL off

I've tried adding the ?ssl=true to the connection string, which is what I needed to do for my API to talk to the database, but (1) I don't know where to do that on the "standard" connection tab and (2) if I do it using the "Connect URL" tab it complains about the sslmode having an invalid value of true.

Great product!

Credential Storage Format

At work, we use a tool called Vault to provision expiring credentials to users. It would be great to have some sort of api or a spec for the storage format so we could automatically update the postbird credentials for postgres.

Add custom snippets

Have browsed through available information, but haven't found any info about possibilities to extend the list snippets with custom code. Is it possible without changing and recompiling the source code?

Best regards,
Hans

Space bar dismisses the "edit value" dialog

Ff you're in the "Edit Value" dialog and hit the space bar, the dialog is dismissed and the record is not saved. This makes adding a space to a text value impossible.

The issue is that hasInput is false on L172:

postbird/lib/alertify.js

Lines 170 to 173 in dbe4d12

key = function (event) {
var keyCode = event.keyCode;
if ((keyCode === keys.SPACE && !hasInput) || (hasInput && keyCode === keys.ENTER)) ok(event);
if (keyCode === keys.ESC && hasCancel) cancel(event);

Server info

I want to make some page with information about server:

  • system variables
  • some statistics (which possible)
  • may be a size of db file for local database
  • run maintenance commands (i don't know which are exists)

This issue was created in Task Tub

Issue with special characters in password

I'm having a problem connecting to a database using a password with special characters. All the special characters are?->=+. Should the password be encoded when building the connection dsn?

TODO

Show loader for long running operations

  • query in query runner
  • export db
  • import db
  • add index
  • add column

Features:

  • able to cancel current running query
  • reconnect if connection lost
  • windows with query log
  • add index for table with many columns (add scrolling)
  • copy query output to clipboard
  • save query output to csv

Update data

Is update data available ? Didn't find any way to update any column value.

Could not install with Node 12.3.1 / OS X 10.14.5

Pulled repo and ran yarn.

Could not build ... any suggestions?

~/src/postbird (master) $ yarn
yarn install v1.16.0
[1/4] ๐Ÿ”  Resolving packages...
[2/4] ๐Ÿšš  Fetching packages...
[3/4] ๐Ÿ”—  Linking dependencies...
[4/4] ๐Ÿ”จ  Building fresh packages...
[-/4] โก€ waiting...
[2/4] โก€ node-sass
[-/4] โก€ waiting...
warning Error running install script for optional dependency: "/Users/sean/src/postbird/node_modules/libpq: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /Users/sean/src/postbird/node_modules/libpq
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args   '/usr/local/Cellar/node/12.3.1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/sean/src/postbird/node_modules/libpq/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/Cellar/node/12.3.1/libexec/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/sean/.node-gyp/12.3.1/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/sean/.node-gyp/12.3.1',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/Cellar/node/12.3.1/libexec/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/sean/.node-gyp/12.3.1/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/sean/src/postbird/node_modules/libpq',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/addon/src/connection.o
../src/connection.cc:204:52: error: too few arguments to function call, single argument 'context' was not specified
  char* colName = PQfname(res, info[0]->Int32Value());
                               ~~~~~~~~~~~~~~~~~~~ ^
/Users/sean/.node-gyp/12.3.1/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/sean/.node-gyp/12.3.1/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/connection.cc:219:50: error: too few arguments to function call, single argument 'context' was not specified
  int colName = PQftype(res, info[0]->Int32Value());
                             ~~~~~~~~~~~~~~~~~~~ ^
/Users/sean/.node-gyp/12.3.1/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/sean/.node-gyp/12.3.1/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/connection.cc:230:39: error: too few arguments to function call, single argument 'context' was not specified
  int rowNumber = info[0]->Int32Value();
                  ~~~~~~~~~~~~~~~~~~~ ^
/Users/sean/.node-gyp/12.3.1/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/sean/.node-gyp/12.3.1/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/connection.cc:231:39: error: too few arguments to function call, single argument 'context' was not specified
  int colNumber = info[1]->Int32Value();
                  ~~~~~~~~~~~~~~~~~~~ ^
/Users/sean/.node-gyp/12.3.1/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/sean/.node-gyp/12.3.1/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/connection.cc:248:39: error: too few arguments to function call, single argument 'context' was not specified
  int rowNumber = info[0]->Int32Value();
                  ~~~~~~~~~~~~~~~~~~~ ^
/Users/sean/.node-gyp/12.3.1/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/sean/.node-gyp/12.3.1/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/connection.cc:249:39: error: too few arguments to function call, single argument 'context' was not specified
  int colNumber = info[1]->Int32Value();
                  ~~~~~~~~~~~~~~~~~~~ ^
/Users/sean/.node-gyp/12.3.1/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/sean/.node-gyp/12.3.1/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/connection.cc:754:29: error: too few arguments to function call, single argument 'isolate' was not specified
  int len = str->Utf8Length() + 1;
            ~~~~~~~~~~~~~~~ ^
/Users/sean/.node-gyp/12.3.1/include/node/v8.h:2678:3: note: 'Utf8Length' declared here
  int Utf8Length(Isolate* isolate) const;
  ^
../src/connection.cc:756:18: error: cannot initialize a parameter of type 'v8::Isolate *' with an lvalue of type 'char *'
  str->WriteUtf8(buffer, len);
                 ^~~~~~
/Users/sean/.node-gyp/12.3.1/include/node/v8.h:2738:26: note: passing argument to parameter 'isolate' here
  int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
                         ^
../src/connection.cc:804:8: warning: 'MakeCallback' is deprecated [-Wdeprecated-declarations]
  Nan::MakeCallback(handle(), emit_f, 1, info);
       ^
../../nan/nan.h:959:3: note: 'MakeCallback' has been explicitly marked deprecated here
  NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
  ^
../../nan/nan.h:103:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
                                       ^
1 warning and 8 errors generated.
make: *** [Release/obj.target/addon/src/connection.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/Cellar/node/12.3.1/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:200:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command \"/usr/local/Cellar/node/12.3.1/bin/node\" \"/usr/local/Cellar/node/12.3.1/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"
gyp ERR! cwd /Users/sean/src/postbird/node_modules/libpq
gyp ERR! node -v v12.3.1
โœจ  Done in 6.63s.

node-gyp build failed

> [email protected] install /Users/me/path/postbird/node_modules/libpq
> node-gyp rebuild

/bin/sh: pg_config: command not found
gyp: Call to 'pg_config --libdir' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/me/.nvm/versions/node/v9.3.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack     at ChildProcess.emit (events.js:159:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Darwin 17.3.0
gyp ERR! command "/Users/me/.nvm/versions/node/v9.3.0/bin/node" "/Users/me/.nvm/versions/node/v9.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users//me/path/postbird/node_modules/libpq
gyp ERR! node -v v9.3.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/me/.npm/_logs/2017-12-15T09_56_51_775Z-debug.log

Node 9.3.0
Npm 5.6.0

Do you know what's wrong with this?

TypeError: Invalid version 11.2

Hey,

I am getting this error when trying to connect to PostgreSQL Version 11.2 on Windows 10 1809.

image

I couldn't find any mention of a maximum allowed version so I am assuming this is a bug.

NODE_MODULE_VERSION error

When ./run, I get this:

ERROR error:  Error: The module '/Users/john/postbird/node_modules/libpq/build/Release/addon.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 59. This version of Node.js requires
NODE_MODULE_VERSION 54. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or`npm install`).
INFO Error: The module '/Users/john/postbird/node_modules/libpq/build/Release/addon.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 59. This version of Node.js requires
NODE_MODULE_VERSION 54. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or`npm install`).
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20)
    at Object.Module._extensions..node (module.js:598:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at bindings (/Users/john/postbird/node_modules/bindings/bindings.js:76:44)
    at Object.<anonymous> (/Users/john/postbird/node_modules/libpq/index.js:1:201)

I removed libpq folder and do npm rebuild and npm install but not solved the problem.

What's the possible workaround for this?
I guess it has something to do with node version. I'm not sure.

node v9.3.0
npm 5.6.0

linux support

Seeing as this is Electron based why limit yourself to macOS? Linux still needs a good Postgres GUI client.

Problem with uuid format

Trying to edit a field in a table containing uuid results in an error saying

invalid input syntax for type uuid: ""464b8b3a-9f21-4c4f-b18a-cd43d56989a9 "".

That data being valid for postgres, There may be a problem with uuid format definition

Edit column to numeric looses scale

Hi, like your tool!

Seems that there is an issue with column edit.

Changing a column to numeric and using the 'max length' field to add the precision and scale like 7,2 alters the column to numeric(7,0).

The generated query was: ALTER TABLE "public"."booking" ALTER COLUMN "total" TYPE numeric(7) USING "total"::numeric;

Probably due to field sanitizing?

changes to existing connections are lost

Some feedback on the "connection pane"

If you create and "save" a connection, then open postbird again, to modify it, there's no "save changes" button. The changes "take" until you move off that connection to a different one or restart Postbird. Confusing.

Feature request - Quick filter

It would be nice to quickly filter results, like it is possible in DB Browser for SQLite.

I have attached a screenshot of how this works in DB Browser:

sqlite_db_browser

Enhancement request for multiple query tabs

I really like the simple and effective design of Postbird and I'm finding myself using it on a daily basis. However, since I'm using Postbird so much the query tab gets filled with many rows of commonly used code. Would it be possible to:

  1. Implement save (sql) and open options under the file menu?
  2. Possibility to have several query tabs open simultaneously?

Add global short cuts

cmd + r => refresh
cmd + t => new tab
cmd + w => close tab
cmd + f find things (don't know which)

And some other short cuts to make easier navigation. Choose table, choose database, switch to content tab, switch to query tab

This issue was created in Task Tub

Sentry is a security / data protection risk

Postbird seems pretty great but debug logs probably shouldn't be sent without explicit consent, especially considering they may be expected to contain sensitive data or connection info. (Even if Sentry claim to scrub it, it's still sent out.)
This is a massive data protection / GDPR / privacy risk to Postbird users.
By default, sensitive data probably should not be leaked.
Consent should probably be gathered and stored.

Signing for macOs

This project will benefit from signing code for mac (only downloadable file, no plans to put in app store for now):

  1. Running first time without warning
  2. Deliver updates using standard Mac's updater (docs)

If anyone can help with it, please let me know! I will be very thankful

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.