Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iOO7t-0000In-Fe for pgsql-general@arkaria.postgresql.org; Sat, 26 Oct 2019 15:37:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iOO7r-0002cJ-Ms for pgsql-general@arkaria.postgresql.org; Sat, 26 Oct 2019 15:37:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iOO7r-0002bw-9d for pgsql-general@lists.postgresql.org; Sat, 26 Oct 2019 15:37:11 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iOO7k-0007wC-K7 for pgsql-general@lists.postgresql.org; Sat, 26 Oct 2019 15:37:10 +0000 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 58D152613D5 for ; Sat, 26 Oct 2019 08:38:31 -0700 (PDT) Date: Sat, 26 Oct 2019 08:38:31 -0700 (PDT) From: Rich Shepard Reply-To: Rich Shepard To: pgsql-general@lists.postgresql.org Subject: Updating data: confirmation and question Message-ID: User-Agent: Alpine 2.20 (LNX 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Before my old server died I ran pg_dumpall on the database there and copied that to my new server. The old database was postgresql-10 and the new one is postgresql-11.5. Am I correct that I can run 'pgsql -f .sql' and overwrite the existing databases with the newer data? Checking the database names in both I see that I mistakenly used hyphens rather than underscores in one database name. I can change that in the .sql file but have not before learned how/whether I can change a database name using psql. What's the best approach to changing the existing hypephenated name? TIA, Rich