Re: database name aliases?

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Reece Hart <reece(at)harts(dot)net>
Cc: Talha Khan <talha(dot)amjad(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: database name aliases?
Date: 2006-11-07 00:43:38
Message-ID: 1162860218.31124.315.camel@dogma.v10.wvs
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 2006-11-06 at 16:29 -0800, Reece Hart wrote:
> On Tue, 2006-11-07 at 04:54 +0500, Talha Khan wrote:
> > You can do this by using a script. I mean whenever you are creating
> > a new version of the database. you can do that by running a script
> > that creates a database and then stores the name of that database
> > in an environmental variable . Now you can run psql by connecting to
> > a database through that variable.
>
> I think I understand the gist of your proposal, but psql was just one
> client example. In principle, I'd want the same alias to be exposed to
> psql, perl DBI, odbc, jdbc, etc. I really think this should be done in
> the database itself to ensure consistency.
>
> -Reece

You can use "ALTER DATABASE name RENAME TO newname;". Does that help?

I don't think you cane have aliases to the same database, however.

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Reece Hart 2006-11-07 00:58:13 R and postgres
Previous Message AgentM 2006-11-07 00:40:54 Re: database name aliases?