Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: pg_settings doesn't report unit column properly #30717

Open
knz opened this issue Sep 27, 2018 · 4 comments
Open

sql: pg_settings doesn't report unit column properly #30717

knz opened this issue Sep 27, 2018 · 4 comments
Labels
A-sql-pgcompat Semantic compatibility with PostgreSQL C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. E-easy Easy issue to tackle, requires little or no CockroachDB experience E-quick-win Likely to be a quick win for someone experienced. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@knz
Copy link
Contributor

knz commented Sep 27, 2018

The output of SHOW [SESSION] and pg_settings is currently inconsistent / incompatible with postgres.

Postgres:

kena=# select name,setting,unit from pg_settings where name='statement_timeout';
       name        | setting | unit
-------------------+---------+------
 statement_timeout | 0       | ms
(1 row)

kena=# show statement_timeout;
 statement_timeout
-------------------
 0
(1 row)

CockroachDB:

root@127.0.0.1:29726/defaultdb> select name,setting,unit from pg_settings where name='statement_timeout';
        name        | setting | unit
+-------------------+---------+------+
  statement_timeout | 0      | NULL
(1 row)

Time: 653.938µs

root@127.0.0.1:29726/defaultdb> show statement_timeout;
  statement_timeout
+-------------------+
  0s
(1 row)

Time: 472.901µs

In other words: CockroachDB doesn't report the unit column.

Jira issue: CRDB-4823

@knz knz added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. A-sql-pgcompat Semantic compatibility with PostgreSQL labels Sep 27, 2018
craig bot pushed a commit that referenced this issue Oct 5, 2018
30702: sql,pgwire: fix a host of pgwire/sql interaction bugs r=knz a=knz

First commit from #30691.

Fixes #30701.
Fixes #30692.
Fixes #30693.
Fixes #30697.
Fixes #30698.
Fixes #30703.
Informs #30717.

With special thanks to @benesch for asking me to poke at this.

Co-authored-by: Raphael 'kena' Poss <knz@cockroachlabs.com>
@jordanlewis jordanlewis changed the title sql: inconsistent unit reporting between pg_settings and SHOW sql: pg_settings doesn't report unit column properly May 9, 2019
@github-actions
Copy link

github-actions bot commented Jun 5, 2021

We have marked this issue as stale because it has been inactive for
18 months. If this issue is still relevant, removing the stale label
or adding a comment will keep it active. Otherwise, we'll close it in
5 days to keep the issue queue tidy. Thank you for your contribution
to CockroachDB!

@knz
Copy link
Contributor Author

knz commented Jun 5, 2021

still exists in 21.1

@jlinder jlinder added the T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) label Jun 16, 2021
@github-actions
Copy link

We have marked this issue as stale because it has been inactive for
18 months. If this issue is still relevant, removing the stale label
or adding a comment will keep it active. Otherwise, we'll close it in
10 days to keep the issue queue tidy. Thank you for your contribution
to CockroachDB!

@knz
Copy link
Contributor Author

knz commented Sep 22, 2023

The unit is still missing in cockroachdb.

@knz knz added T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) and removed no-issue-activity T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Sep 22, 2023
@knz knz added E-easy Easy issue to tackle, requires little or no CockroachDB experience E-quick-win Likely to be a quick win for someone experienced. labels Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-pgcompat Semantic compatibility with PostgreSQL C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. E-easy Easy issue to tackle, requires little or no CockroachDB experience E-quick-win Likely to be a quick win for someone experienced. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
No open projects
Status: Triage
Development

No branches or pull requests

2 participants