jusi-postgres
jusi-postgres is the PostgreSQL exact-provider plugin for Jusi 1.0 and the
shared jusi-sql family. It exposes the postgres/postgresql provider for
%%sql cells. The family owns target selection, magic dispatch, completion
ranges, metadata caching, operation routing, and common VisiData SQL commands.
Example session config:
[sql.targets.analytics]
provider = "postgres"
host = "localhost"
port = 5432
dbname = "analytics"
user = "me"
initial_fetch = 100
All psycopg connection options may be provided in the target config. The
additional krb5ccname option points at a custom Kerberos credential cache and
is passed to libpq through KRB5CCNAME while connecting.
Metadata for SQL completion is collected asynchronously on a separate connection. Large catalogs should be filtered or disabled:
[sql.targets.analytics]
provider = "postgres"
host = "db.example.com"
dbname = "analytics"
user = "me"
metadata_schemas = ["public", "analytics"]
metadata_max_rows = 1000000
collect_metadata = true
Use collect_metadata = false to skip completion metadata for a target. If
collection crosses metadata_max_rows, it stops and warns that schema
filtering is required. Provider options belong in the target configuration;
the shared Jusi 1.0 %%sql syntax accepts one target alias.
VisiData mappings:
1to9: fetch that many more rows for the active result sheet.gf: prompt for a row count to fetch;0fetches the rest of the cursor.gc: commit the current connection.gr: roll back the current connection.gb: write the selected raw cell value to a temporary file and open it with VisiData. The command prompts for an optional extension; an empty extension lets VisiData infer the file type from content and filename.
Follow-up cells reuse the same VisiData application, PostgreSQL connection,
transaction, and server-side cursors. JusiInterrupt requests cancellation on
that connection. Closing the client closes its cursors, metadata connection,
main connection, private control socket, and staged launch data.
The terminal application loads normal VisiData user configuration and plugins
before installing Jusi and PostgreSQL commands. This includes ~/.visidatarc
and paths selected through VD_CONFIG and VD_DIR.
Local development database
Start a disposable PostgreSQL fixture:
scripts/run-postgres.sh
The script builds jusi-postgres-dev, runs a local container on
127.0.0.1:55432, waits for readiness, and prints this config:
[sql.targets.local_postgres]
provider = "postgres"
host = "127.0.0.1"
port = 55432
dbname = "jusi"
user = "jusi"
password = "jusi"
initial_fetch = 25
The fixture creates demo.accounts, demo.events, demo.account_summary,
demo.account_event_count(bigint), and demo.blob_files for result browsing,
completion checks, and raw bytea/blob handling.
For an already-running development container, install or refresh the blob table:
scripts/install-blob-fixture.sh
The source zip fixture is stored at fixtures/test-blob.zip.
Initialize without running a query
Execute a cell containing only %%sql analytics, or run :JusiBootstrap while
keeping a query draft in the cell. This opens a ready client and starts its
normal metadata warm-up without running the draft or a dummy SQL query.
Completion can use cached metadata immediately and fresh metadata as it arrives.
Subsequent queries use the same client. Repeated :JusiBootstrap reuses it;
changing the target alias requires closing the old client first.
This requires the bootstrap-capable core and matching jusi-sql and SQL provider
updates. No query history entry is added for initialization.
Metadata
Release files for jusi-postgres 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| jusi_postgres-0.2.2.tar.gz | 19.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jusi_postgres-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.5 kB
Release files / jusi_postgres-0.2.2.tar.gz
| Download URL | jusi_postgres-0.2.2.tar.gz |
|---|---|
| Size | 19.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62f2914372e538cd12c9b0bb0e275ce3a776ef4911056f651f98402a3d3976bd
|
|
BLAKE2b-256 checksum How to use checksums |
ab5393e485c022207ce539096a18827b28d0a8c5ce3facd2c7fe8520121bfc87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.1
|
Release files / jusi_postgres-0.2.2-py3-none-any.whl
| Download URL | jusi_postgres-0.2.2-py3-none-any.whl |
|---|---|
| Size | 17.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f60a9281b16b8e993f0920d0549ae2b7ad37be441b47e85960e1466d4267c62
|
|
BLAKE2b-256 checksum How to use checksums |
ceb6019f2ba2b34f4c71cf25343c31221c72cac87dc78f53e6a51173be1eb7cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.1
|
Security for jusi-postgres 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.