OmniDB icon indicating copy to clipboard operation
OmniDB copied to clipboard

\d or describe doesn't work

Open wayne-ss opened this issue 4 years ago • 3 comments

I used omniDB 3.0.2b with PostgreSQL 12.4, and describe-related commands doesn't work in console.

Here's the effect when I run in OmniDB console:

test_db=# select * from images
+----+----------+-------+
| id | path     | level |
+----+----------+-------+
| 1  | /a/b/ppp | 1     |
+----+----------+-------+
CLOSE CURSOR

test_db=# describe images
column c.relhasoids does not exist
LINE 2: ...                 c.relhasrules, c.relhastriggers, c.relhasoi...
                                                             ^

test_db=# \d images
column c.relhasoids does not exist
LINE 2: ...                 c.relhasrules, c.relhastriggers, c.relhasoi...
                                                             ^

And here's the effect when I run the same commands using psql locally:

psql (13.0, server 12.4 (Debian 12.4-1.pgdg100+1))
Type "help" for help.

test_db=# \d images
                            Table "public.images"
 Column |  Type   | Collation | Nullable |              Default               
--------+---------+-----------+----------+------------------------------------
 id     | integer |           | not null | nextval('images_id_seq'::regclass)
 path   | text    |           | not null | 
 level  | integer |           | not null | 
Indexes:
    "images_pkey" PRIMARY KEY, btree (id)

test_db=# select version()
test_db-# 
test_db-# \! psql -V
psql (PostgreSQL) 13.0

I goolge'd the question and figure that it might occur when the client was below version 12. (I also tried OmniDB 2.17.0 and got the same issue.) I wonder if I can change such settings in OmniDB to make describe work. Thanks in advance.

wayne-ss avatar Nov 04 '20 09:11 wayne-ss

Hi @SiweiShen2019 ,

Thank you very much for reporting this and for the details you provided.

OmniDB Console Tab uses dbcli/pgspecial behind the curtains to handle psql meta-commands.

OmniDB 3.0.2b was built with pgspecial version fixed in 1.11.5 which didn't support PostgreSQL 12 yet.

I just tested latest pgspecial and it works:

image

So for next beta release 3.0.3b which should go out in the next few days, we are going to use latest pgspecial.

Best regards,

William

wind39 avatar Nov 05 '20 14:11 wind39

Glad to hear it! I also look forward to 3.0.3b.

wayne-ss avatar Nov 05 '20 14:11 wayne-ss

I'm running 3.0.3b and the problem persists (i'm running against a Postgres 12.7 DB, getting the same errors as OP)

davclark avatar Sep 22 '21 23:09 davclark