xo / usql

Universal command-line interface for SQL databases
MIT License
8.81k stars 346 forks source link

'\timing on' not work in greenplum 6 #444

Closed l1t1 closed 4 months ago

l1t1 commented 4 months ago

I run following steps and no timing info displayed

pg:test@192/postgres=> \timing on
Timing is on.
pg:test@192/postgres=> insert into tblc select i,'a'||(i::varchar) from generate_series(1,10000000)t(i);
INSERT 10000000
kenshaw commented 4 months ago

@l1t1 Thank you for bringing this to my attention. This will be fixed.

kenshaw commented 4 months ago

I've fixed this, but I'm not able to cut a release at this time. Please build/install from source you you really need this functionality immediately. Thanks.

l1t1 commented 4 months ago

thanks a lot

l1t1 commented 4 months ago

I download the Artifacts from https://github.com/xo/usql/actions/runs/8152442988 in Linux, it works,

$ ./usql_static --version
usql 0.0.0-dev

$ ./usql_static  sq:sql.db
Connected with driver sqlite3 (SQLite3 3.45.1)
Type "help" for help.

sq:sql.db=> create table t(a int,b varchar(100));
CREATE TABLE
sq:sql.db=> insert into t values(1,'sfsf');
INSERT 1

sq:sql.db=> \timing on
Timing is on.
sq:sql.db=> select * from t;
 a |  b   
---+------
 1 | sfsf 
(1 row)

Time: 0.511 ms
sq:sql.db=> insert into t values(4,'eee');
INSERT 1
Time: 6.176 ms

in Windows, it(usql0 ) quit sliently, the old version(usql 0.14.3) works fine. my windows 7 version 6.1.7601

D:\>usql0 pg://localhost/postgres

D:\>usql0

D:\>usql --version
usql 0.14.3
D:\>usql
Type "help" for help.

(not connected)=> \c pg://localhost/postgres
Connected with driver postgres (PostgreSQL 15.2)
pg:localhost/postgres=> \d
        List of relations
 Schema  |     Name      | Type
---------+---------------+-------
 poker24 | cards         | table
l1t1 commented 4 months ago

I test the 0.17.5 version, it also quit on windows 7, version 0.17.0 still works

D:>usql175 --version

D:>usql170 --version usql 0.17.0