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

add typarray column in pg_catalog.pg_type #7555

Closed
fuyufjh opened this issue Jan 27, 2023 · 1 comment
Closed

add typarray column in pg_catalog.pg_type #7555

fuyufjh opened this issue Jan 27, 2023 · 1 comment
Assignees
Labels
difficulty/simple Issues that relatively easy and friendly to newcomers. help wanted Issues that need help from contributors type/feature

Comments

@fuyufjh
Copy link
Contributor

fuyufjh commented Jan 27, 2023

Is your feature request related to a problem? Please describe.

Used in https://github.com/psycopg/psycopg2/blob/68d786b610dc18bd9201fa65bc8be541b3d16386/lib/extras.py#L907

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

@fuyufjh fuyufjh added help wanted Issues that need help from contributors type/feature difficulty/simple Issues that relatively easy and friendly to newcomers. labels Jan 27, 2023
@github-actions github-actions bot added this to the release-0.1.16 milestone Jan 27, 2023
@fuyufjh fuyufjh self-assigned this Feb 6, 2023
@fuyufjh
Copy link
Contributor Author

fuyufjh commented Feb 16, 2023

The typarray field in pg_catalog.pg_type refers to the type of its associated array type. For example, here are the rows of type integer and integer[].

dev=# select oid, typname, typname, typelem, typarray, typsend, typreceive from pg_type where oid in (23, 1007);
 oid  | typname | typname | typelem | typarray |  typsend   | typreceive
------+---------+---------+---------+----------+------------+------------
   23 | int4    | int4    |       0 |     1007 | int4send   | int4recv
 1007 | _int4   | _int4   |      23 |        0 | array_send | array_recv
(2 rows)

Whenever a user-defined type is created, PostgreSQL automatically creates an associated array type, whose name consists of the element type's name prepended with an underscore

Unfortunately, these associated array types do not exist in RisingWave. I can hardly find a reasonable way to mock that.


IMPORTANT NOTES: If you run into this problem when using sqlalchemy, please use https://github.com/risingwavelabs/sqlalchemy-risingwave as a substitute for the PG native plugin.

@fuyufjh fuyufjh closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/simple Issues that relatively easy and friendly to newcomers. help wanted Issues that need help from contributors type/feature
Projects
None yet
Development

No branches or pull requests

2 participants