https://github.com/cube2222/octosql-plugin-postgres
https://github.com/cube2222/octosql-plugin-postgres
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cube2222/octosql-plugin-postgres
- Owner: cube2222
- License: mpl-2.0
- Created: 2021-12-23T17:20:51.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-25T21:06:33.000Z (over 3 years ago)
- Last Synced: 2025-10-06T07:47:14.980Z (9 months ago)
- Language: Go
- Size: 68.4 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OctoSQL PostgreSQL Plugin
This plugin adds PostgreSQL support to OctoSQL.
## Installation
```
octosql plugin install postgres
```
## Configuration
The available configuration variables are:
- host
- port
- user
- password
- database
- schema
An example octosql.yml file would be:
```yaml
databases:
- name: mydb
type: postgres
config:
host: localhost
port: 3306
database: mydatabase
schema: public
user: myuser
password: mypassword
```
You can also set the OCTOSQL_POSTGRES_QUERY_LOGGING environment variable to 1 to enable detailed query logging. They will then be visible in your `~/.octosql/logs.txt` file.
## Usage
After configuring a database as described above you can use tables from the configured database in your OctoSQL queries:
```
octosql "SELECT * FROM mydb.mytable" --describe
octosql "SELECT COUNT(*) FROM mydb.mytable"
```