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

"could not decorrelate subquery" when Yii2 gets column info #85595

Closed
Sarke opened this issue Aug 4, 2022 · 3 comments
Closed

"could not decorrelate subquery" when Yii2 gets column info #85595

Sarke opened this issue Aug 4, 2022 · 3 comments
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-community Originated from the community T-sql-queries SQL Queries Team X-blathers-triaged blathers was able to find an owner

Comments

@Sarke
Copy link

Sarke commented Aug 4, 2022

Describe the problem

I get a SQLSTATE[XXUUU]: <<Unknown error>>: 7 ERROR: could not decorrelate subquery error.

The code in question is from https://github.com/yiisoft/yii2/blob/master/framework/db/pgsql/Schema.php#L473-L533

Specifically, the issue is with this part, as removing it removes the error:

    CASE WHEN COALESCE(td.typtype, tb.typtype, t.typtype) = 'e'::char
        THEN array_to_string((SELECT array_agg(enumlabel) FROM pg_enum WHERE enumtypid = COALESCE(td.oid, tb.oid, a.atttypid))::varchar[], ',')
        ELSE NULL
    END AS enum_values,

To Reproduce

  1. Set up CockroachDB cluster
  2. Set up basic Yii2 app
  3. Make any model query (Yii2 will grab column info)

Expected behavior
No error.

Environment:

  • CockroachDB version: serverless
  • Server OS: Linux
  • Client app: fails in both PHP/Yii2 and in DBeaver

Additional context
Total failure of app.

Jira issue: CRDB-18329

@Sarke Sarke added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Aug 4, 2022
@blathers-crl
Copy link

blathers-crl bot commented Aug 4, 2022

Hello, I am Blathers. I am here to help you get the issue triaged.

Hoot - a bug! Though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here.

I have CC'd a few people who may be able to assist you:

  • @cockroachdb/sql-experience (found keywords: pg_)

If we have not gotten back to your issue within a few business days, you can try the following:

  • Join our community slack channel and ask on #cockroachdb.
  • Try find someone from here if you know they worked closely on the area and CC them.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

@blathers-crl blathers-crl bot added O-community Originated from the community X-blathers-triaged blathers was able to find an owner labels Aug 4, 2022
@Sarke
Copy link
Author

Sarke commented Aug 4, 2022

Possibly related? #67951

@blathers-crl blathers-crl bot added the T-sql-queries SQL Queries Team label Aug 4, 2022
@mgartner
Copy link
Collaborator

This was fixed by #95234, which should be included in v23.1. Closing.

@mgartner mgartner self-assigned this Jan 20, 2023
@mgartner mgartner moved this to Done in SQL Queries Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-community Originated from the community T-sql-queries SQL Queries Team X-blathers-triaged blathers was able to find an owner
Projects
Archived in project
Development

No branches or pull requests

2 participants