Postgres - want a database to have two names












0















One of my Postgres databases is named entirely in upper-case, and a new bit of software needs to see it in lower-case. I've tried renaming it, but unfortunately that breaks the huge multitude of things that already rely on it being in upper-case (as they've got quotes in the connection string so need it in upper case). Going through and fixing those would be a risky, mammoth undertaking as there is nobody in the company left who originally created the database and all the things that rely on it, and documentation is scarce.



As such, I've come to the conclusion that the best way forwards is to leave the existing database as it is, but to try and have it available by two names - its original name, and a new name. I would imagine just about everyone here already knows of something like this anyway, but I'm relatively new. I've seen terms like alias and synonym in my Googling.



However, I don't believe either of these can be done to an entire database (if I'm wrong then I would be very happy with some information to go on). I've also tried creating an empty database (with the nice new lower-case name) and creating simple views to the original's tables, but of course views don't generally go cross-database.



Anyone got any ideas?









share







New contributor




user25730 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    0















    One of my Postgres databases is named entirely in upper-case, and a new bit of software needs to see it in lower-case. I've tried renaming it, but unfortunately that breaks the huge multitude of things that already rely on it being in upper-case (as they've got quotes in the connection string so need it in upper case). Going through and fixing those would be a risky, mammoth undertaking as there is nobody in the company left who originally created the database and all the things that rely on it, and documentation is scarce.



    As such, I've come to the conclusion that the best way forwards is to leave the existing database as it is, but to try and have it available by two names - its original name, and a new name. I would imagine just about everyone here already knows of something like this anyway, but I'm relatively new. I've seen terms like alias and synonym in my Googling.



    However, I don't believe either of these can be done to an entire database (if I'm wrong then I would be very happy with some information to go on). I've also tried creating an empty database (with the nice new lower-case name) and creating simple views to the original's tables, but of course views don't generally go cross-database.



    Anyone got any ideas?









    share







    New contributor




    user25730 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      One of my Postgres databases is named entirely in upper-case, and a new bit of software needs to see it in lower-case. I've tried renaming it, but unfortunately that breaks the huge multitude of things that already rely on it being in upper-case (as they've got quotes in the connection string so need it in upper case). Going through and fixing those would be a risky, mammoth undertaking as there is nobody in the company left who originally created the database and all the things that rely on it, and documentation is scarce.



      As such, I've come to the conclusion that the best way forwards is to leave the existing database as it is, but to try and have it available by two names - its original name, and a new name. I would imagine just about everyone here already knows of something like this anyway, but I'm relatively new. I've seen terms like alias and synonym in my Googling.



      However, I don't believe either of these can be done to an entire database (if I'm wrong then I would be very happy with some information to go on). I've also tried creating an empty database (with the nice new lower-case name) and creating simple views to the original's tables, but of course views don't generally go cross-database.



      Anyone got any ideas?









      share







      New contributor




      user25730 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      One of my Postgres databases is named entirely in upper-case, and a new bit of software needs to see it in lower-case. I've tried renaming it, but unfortunately that breaks the huge multitude of things that already rely on it being in upper-case (as they've got quotes in the connection string so need it in upper case). Going through and fixing those would be a risky, mammoth undertaking as there is nobody in the company left who originally created the database and all the things that rely on it, and documentation is scarce.



      As such, I've come to the conclusion that the best way forwards is to leave the existing database as it is, but to try and have it available by two names - its original name, and a new name. I would imagine just about everyone here already knows of something like this anyway, but I'm relatively new. I've seen terms like alias and synonym in my Googling.



      However, I don't believe either of these can be done to an entire database (if I'm wrong then I would be very happy with some information to go on). I've also tried creating an empty database (with the nice new lower-case name) and creating simple views to the original's tables, but of course views don't generally go cross-database.



      Anyone got any ideas?







      postgresql alias synonyms





      share







      New contributor




      user25730 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      user25730 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      user25730 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 1 min ago









      user25730user25730

      1




      1




      New contributor




      user25730 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      user25730 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      user25730 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "182"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          user25730 is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f232982%2fpostgres-want-a-database-to-have-two-names%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          user25730 is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          user25730 is a new contributor. Be nice, and check out our Code of Conduct.













          user25730 is a new contributor. Be nice, and check out our Code of Conduct.












          user25730 is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Database Administrators Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f232982%2fpostgres-want-a-database-to-have-two-names%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          الفوسفات في المغرب

          Four equal circles intersect: What is the area of the small shaded portion and its height

          جامعة ليفربول