Skip to content

sql: support Hibernate's use of _pg_expandarray #16971

@justinj

Description

@justinj

Adding an index to a table in Hibernate issues a query which makes use of this. Note that supporting this also means that we would need to support record types. The query below should work, if this is implemented:

SELECT (i.keys).n FROM (SELECT information_schema._pg_expandarray(indkey) AS keys FROM pg_index) AS i;

This function takes an array a and returns a set of records that looks like the following:

 x   |  n
----------
a[1] |  1
a[2] |  2
a[3] |  3
a[4] |  4
...

The work is to be decomposed as follows:

Metadata

Metadata

Assignees

Labels

A-sql-pgcompatSemantic compatibility with PostgreSQLA-sql-semanticsC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)O-supportWould prevent or help troubleshoot a customer escalation - bugs, missing observability/tooling, docs

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions