Skip to content

Error When Querying pg_settings with pg_duckdb installed #1005

@AndrewJackson2020

Description

@AndrewJackson2020

What happens?

Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "/site/home/postgres/.venv/lib64/python3.9/site-packages/psycopg/cursor.py", line 189, in fetchone
    record = self._tx.load_row(self._pos, self._make_row)
  File "/site/home/postgres/.venv/lib64/python3.9/site-packages/psycopg/_py_transformer.py", line 331, in load_row
    record[col] = self._row_loaders[col](val)
  File "/site/home/postgres/.venv/lib64/python3.9/site-packages/psycopg/types/string.py", line 117, in load
    return data.decode(self._encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa3 in position 32: invalid start byte

To Reproduce

I also saw the same results on psycopg2

import psycopg
conn = psycopg.connect('host=/run/postgresql port=5433 dbname=my_db_name')
cur = conn.cursor()
cur.execute("SELECT name, setting, unit, context, vartype, boot_val, min_val, max_val, sourcefile, pending_restart FROM pg_settings;")
cur.fetchall()

OS:

Linux x86_64

pg_duckdb Version (if built from source use commit hash):

1.0.0

Postgres Version (if built from source use commit hash):

17.5

Hardware:

No response

Full Name:

Andrew Jackson

Affiliation:

Andrew Jackson

What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have tested with a stable release

Did you include all relevant data sets for reproducing the issue?

Yes

Did you include all code required to reproduce the issue?

  • Yes, I have

Did you include all relevant configuration (e.g., CPU architecture, Linux distribution) to reproduce the issue?

  • Yes, I have

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions