{"id":24297783,"url":"https://github.com/ibarwick/fbsql","last_synced_at":"2025-09-25T23:30:56.710Z","repository":{"id":12763241,"uuid":"15436567","full_name":"ibarwick/fbsql","owner":"ibarwick","description":"fbsql is a simple command-line client for the Firebird database, inspired by PostgreSQL's psql","archived":false,"fork":false,"pushed_at":"2024-05-19T01:52:36.000Z","size":448,"stargazers_count":10,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-07T20:11:29.835Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ibarwick.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-12-25T14:54:32.000Z","updated_at":"2024-05-19T01:52:39.000Z","dependencies_parsed_at":"2024-05-19T02:37:16.280Z","dependency_job_id":"966cd735-49c3-429d-b3df-22787f5ef741","html_url":"https://github.com/ibarwick/fbsql","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ibarwick/fbsql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibarwick%2Ffbsql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibarwick%2Ffbsql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibarwick%2Ffbsql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibarwick%2Ffbsql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ibarwick","download_url":"https://codeload.github.com/ibarwick/fbsql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibarwick%2Ffbsql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276995465,"owners_count":25742020,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-25T02:00:09.612Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-16T20:29:26.263Z","updated_at":"2025-09-25T23:30:56.424Z","avatar_url":"https://github.com/ibarwick.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"fbsql - a command-line client for Firebird\n==========================================\n\n`fbsql` is a simple command-line client for the Firebird database, inspired\nby PostgreSQL's `psql`. It is very much a proof-of-concept serving primarily\nas a testbed for `libfq` (itself an experimental partial port of PostgreSQL's\n`libpq` created to facilitate the development of `firebird_fdw`).\n\nfbsql provides some advantages over Firebird's native client `isql`,\nincluding:\n\n - `libreadline`-based tab completion for both SQL and database objects\n - some useful meta commands (\"slash commands\")\n - autocommit mode (default: `on`)\n - indicates transaction status in the prompt\n\nNote that by default, fbsql assumes a UTF-8 environment. An alternative\nencoding can be provided with the `-C/--client-encoding` command line option,\nhowever it is not possible to switch encoding during a session.\n\n`fbsql` is far from complete. *USE AT YOUR OWN RISK.*\n\n\nInstallation\n------------\n\nRPM packages for CentOS 6/7 are available via the Fedora \"copr\" build system;\nfor details see here: \u003chttps://copr.fedorainfracloud.org/coprs/ibarwick/libfq/\u003e\n\n`fbsql` requires the Firebird C API wrapper `libfq`; RPM packages are also\navailable (see the [libfq GitHub page](https://github.com/ibarwick/libfq)\nfor details.\n\nIf installing from source, as well as `fbsql`, the Firebird client library\nand header files are required. Dev packages for `libreadline` must also be\npresent.\n\nBuild with the usual:\n\n    ./configure\n    make install\n\nYou may need to specify the location of `ibase.h` in `CFLAGS`.\n\n\nUsage\n-----\n\n    $ fbsql --help\n    fbsql is an interactive terminal for Firebird.\n\n    Usage:\n      fbsql [OPTION]... [DBNAME [USERNAME]]\n\n    General options:\n      -V, --version            output version information, then exit\n      -?, --help               show this help, then exit\n\n    Connection options:\n      -d, --dbname=DBNAME      database to connect to\n      -u, --username=USERNAME  database user name\n      -p, --password           password\n      -C, --client-encoding    client encoding (default: UTF-8)\n\n    Display options:\n      -E, --echo-internal      display queries generated by internal commands\n\n\ne.g.:\n\n    fbsql -d localhost:employee.fdb -u sysdba -p masterke\n\nThe environment variables `ISC_DATABASE`, `ISC_USER` and `ISC_PASSWORD` are also\nrecognized.\n\nA non-default port can be provided as part of the connection string, e.g.\n\n    fbsql -d localhost/3051:employee.fdb -u sysdba -p masterke\n\nAfter connecting to Firebird, queries can be executed. Enter `help` for some\nvery basic help, or `\\?` for details on available slash commands:\n\n    fbsql 0.3.0\n    Connected to Firebird v4.0.1 (libfq version 0.6.0)\n    SQL\u003e \\?\n    General\n      \\copyright             Show fbsql copyright information\n      \\g or ;                execute query\n      \\q                     quit fbsql\n\n    Display\n      \\a                     Toggle aligned mode (currently on)\n      \\format OPTION [VALUE] Set or show table output formatting option:\n                               {alignment|border|null}\n      \\plan [SETTING]        Display plan {off|on|only} (currently off)\n      \\timing                Toggle execution timing (currently on)\n      \\tznames               Toggle display of time zone names (currently on)\n\n    Environment\n      \\activity              Show information about current database activity\n      \\conninfo              Show information about the current connection\n\n    Database\n      (options: S = show system objects, + = additional detail)\n      \\l                     List information about the current database\n      \\autocommit            Toggle autocommit (currently on)\n      \\d      NAME           List information about the specified object\n      \\df     [PATTERN]      List information about functions matching [PATTERN]\n      \\di[S+] [PATTERN]      List information about indexes matching [PATTERN]\n      \\dp     [PATTERN]      List information about procedures matching [PATTERN]\n      \\ds[S]  [PATTERN]      List information about sequences (generators) matching [PATTERN]\n      \\dt[S]  [PATTERN]      List information about tables matching [PATTERN]\n      \\du                    List users granted privileges on this database\n      \\dv     [PATTERN]      List information about views matching [PATTERN]\n      \\util   [COMMAND]      execute utility command\n                                {set_index_statistics}\n\n\nList all tables:\n\n    SQL\u003e \\dt\n                  List of tables\n     Name             | Owner  | Description\n    ------------------+--------+-------------\n     country          | sysdba |\n     customer         | sysdba |\n     department       | sysdba |\n     employee         | sysdba |\n     employee_project | sysdba |\n     job              | sysdba |\n     proj_dept_budget | sysdba |\n     project          | sysdba |\n     salary_history   | sysdba |\n     sales            | sysdba |\n\n\nGet detailed information about a table:\n\n    SQL\u003e \\d job\n                                     Table \"job\"\n     Column          | Field type    | Modifiers | Default value | Description\n    -----------------+---------------+-----------+---------------+-------------\n     job_code        | VARCHAR(5)    | NOT NULL  |               |\n     job_grade       | SMALLINT      | NOT NULL  |               |\n     job_country     | VARCHAR(15)   | NOT NULL  |               |\n     job_title       | VARCHAR(25)   | NOT NULL  |               |\n     min_salary      | NUMERIC(10,2) | NOT NULL  |               |\n     max_salary      | NUMERIC(10,2) | NOT NULL  |               |\n     job_requirement | BLOB          |           |               |\n     language_req    | VARCHAR(15)   |           |               |\n\n    Indexes:\n      rdb$primary2 PRIMARY KEY (job_code, job_grade, job_country)\n      minsalx (job_country, min_salary)\n      maxsalx (job_country, max_salary)\n    Foreign keys:\n      rdb$foreign3 FOREIGN KEY (job_country) REFERENCES country (country) ON UPDATE RESTRICT ON DELETE RESTRICT\n\n\nLimitations\n-----------\n\nMany, in particular:\n\n - folds all object names to lower case by default and does not properly\n   handle object names with mixed-case\n - command terminator is limited to a semicolon; it is currently not possible\n   to create functions/procedures with `fbsql`\n - no `BLOB`/`ARRAY` support (due to missing support in `libfq`)\n - does not properly align column data containing non-ASCII characters\n - no configuration file support\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibarwick%2Ffbsql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibarwick%2Ffbsql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibarwick%2Ffbsql/lists"}