iso_8601 intervalstyle currently not supported
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3k
- Forks
- 190
- PR merge metrics
- No merged PRs in 30d
Description
Hi guys!
Any plans to support different values for intervalstyle? maybe set this in the session level?
are there any workarounds available ?
Traceback (most recent call last):
File "/usr/bin/pg_activity", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/lib/python3/dist-packages/pgactivity/cli.py", line 413, in main
ui.main(term, cfg, dataobj, host, args)
File "/usr/lib/python3/dist-packages/pgactivity/ui.py", line 31, in main
server_information = data.pg_get_server_information(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pgactivity/data.py", line 325, in pg_get_server_information
ret = pg.fetchone(
^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pgactivity/pg.py", line 240, in fetchone
row = cur.fetchone()
^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/psycopg2/extras.py", line 82, in fetchone
res = super().fetchone()
^^^^^^^^^^^^^^^^^^
psycopg2.NotSupportedError: iso_8601 intervalstyle currently not supported
Environment:
cat /etc/os-release 1m 2s ▼ 15:17:47
PRETTY_NAME="Ubuntu 24.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.2 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
pg_activity --version ▼ 15:18:44
pg_activity 3.4.2
Database info:
tenant-8b68e473-5988-4c03-ab6c-633198385d6a=> show intervalstyle;
IntervalStyle
---------------
iso_8601
(1 row)
Thanks!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at pgactivity/data.py in pg_get_server_information, following the call from pgactivity/ui.py and the database access in pgactivity/pg.py. Reproduce the failure with PostgreSQL's iso_8601 intervalstyle and inspect the query and result handling. Done means pg_activity starts successfully with that setting, with relevant coverage added if the repository provides a suitable test location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python
- Domain
- cli, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100