GoogleCloudPlatform / pgadapter

PostgreSQL wire-protocol proxy for Cloud Spanner
https://cloud.google.com/spanner/docs/postgresql-interface#postgresql-client-support
Apache License 2.0
54 stars 20 forks source link

feat: support all 'spanner.*' options in pg_settings #2229

Open olavloite opened 2 weeks ago

olavloite commented 2 weeks ago

Re-writes the pg_settings common table expression to use an array of jsonb instead of a list of UNION ALL statements. This circumvents the limitation that a query cannot contain more than 60 UNION ALLs, which means that we can put a larger value for the limitation on the number of settings included in the CTE. We still restrict the number of elements in the CTE to prevent the query text from becoming too long.