Skip site navigation (1) Skip section navigation (2)

Re: mysql command equivalents?

From: Hassan Schroeder <hassan(dot)schroeder(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: mysql command equivalents?
Date: 2009-10-13 22:46:40
Message-ID: 4eedb92a0910131546n560e700cpf6c62d5f4dee8e40@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
On Tue, Oct 13, 2009 at 3:40 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> [ please keep the list cc'd on replies ]

Sorry, just realized 'reply to list' wasn't used here automatically.

> Hassan Schroeder <hassan(dot)schroeder(at)gmail(dot)com> writes:
>> So, if you're accessing via code, you have to establish a connection
>> to a specific PG database, and then explicitly set the search_path if
>> that db has more than one schema -- is that right?
>
> In general, yeah.  If you like, you can preset the desired search_path
> value as a per-database or per-user setting, and then your code doesn't
> need to think about it.   However, if you're accustomed to issuing
> USE explicitly, I don't see why you wouldn't just change that to SET
> search_path.

Well, apples and oranges; I use `USE databasename` to change DBs
frequently in my command-line client, but never in code -- that's just a
connection (pool) request.

Thanks for the extended explanation!

-- 
Hassan Schroeder ------------------------ hassan(dot)schroeder(at)gmail(dot)com
twitter: @hassan

In response to

pgsql-novice by date

Next:From: Thomas KellererDate: 2009-10-14 17:08:15
Subject: Re: mysql command equivalents?
Previous:From: Tom LaneDate: 2009-10-13 22:40:41
Subject: Re: mysql command equivalents?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group