Uploaded image for project: 'Doctrine DBAL'
  1. Doctrine DBAL
  2. DBAL-807

Index renaming in postgresql does not work when index relates to table inside namespace

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.5
    • Component/s: Platforms
    • Security Level: All
    • Labels:
      None

      Description

      CREATE SCHEMA test;
      CREATE TABLE test.table_name (id INT);
      CREATE INDEX idx_1 ON test.table_name (id);
      

      If index would be renamed, generated sql is:

      ALTER INDEX idx_1 RENAME TO new_index_name;
      

      But valid sql code should be:

      ALTER INDEX test.idx_1 RENAME TO new_index_name;
      

        Issue Links

          Activity

          Hide
          deeky666 Steve Müller added a comment -

          Artur Eshenbrener Can you please provide more details about your use case so that we can reproduce it better. How do you get the wrong SQL?

          Show
          deeky666 Steve Müller added a comment - Artur Eshenbrener Can you please provide more details about your use case so that we can reproduce it better. How do you get the wrong SQL?
          Hide
          strate Artur Eshenbrener added a comment -

          I've pushed failing test, reproduces this problem.
          https://github.com/doctrine/dbal/pull/532

          Show
          strate Artur Eshenbrener added a comment - I've pushed failing test, reproduces this problem. https://github.com/doctrine/dbal/pull/532
          Hide
          doctrinebot Doctrine Bot added a comment -

          A related Github Pull-Request [GH-532] was closed:
          https://github.com/doctrine/dbal/pull/532

          Show
          doctrinebot Doctrine Bot added a comment - A related Github Pull-Request [GH-532] was closed: https://github.com/doctrine/dbal/pull/532
          Hide
          deeky666 Steve Müller added a comment -
          Show
          deeky666 Steve Müller added a comment - Patch supplied in PR: https://github.com/doctrine/dbal/pull/533
          Hide
          doctrinebot Doctrine Bot added a comment -

          A related Github Pull-Request [GH-533] was closed:
          https://github.com/doctrine/dbal/pull/533

          Show
          doctrinebot Doctrine Bot added a comment - A related Github Pull-Request [GH-533] was closed: https://github.com/doctrine/dbal/pull/533
          Hide
          ocramius Marco Pivetta added a comment -

          Resolved in DBAL-822

          Show
          ocramius Marco Pivetta added a comment - Resolved in DBAL-822

            People

            • Assignee:
              deeky666 Steve Müller
              Reporter:
              strate Artur Eshenbrener
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: