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

Re: Multi Database queries

From: Rory Campbell-Lange <rory(at)campbell-lange(dot)net>
To: Ron St-Pierre <rstpierre(at)syscor(dot)com>
Cc: jonathon(at)octahedron(dot)com(dot)au,pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Multi Database queries
Date: 2004-09-22 21:24:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On 22/09/04, Ron St-Pierre (rstpierre(at)syscor(dot)com) wrote:
> >Yes, but, if your databases are all on one server under one postmaster 
> >you should consider using one database with multiple schemas. See:
> >
> We're using this for one of our projects and it really works well. 
> Initially we had separate databases and queried them using dblink, but 
> for our purposes multiple schemas works much better, and cross schema 
> queries are as simple as any other queries. BTW if you are looking at 
> setting up a new system, why not use 7.4.5 (or whatever the latest 
> stable version is)?

I concur. Using schemas works very well. Another benefit is that you can
load your plpgsql functions into a schema and set your search path to
see it or perhaps another schema loaded with test functions.

eg "set search_path = data_schema, function_schema, global_schema;"
eg "set search_path = data_schema, test_function_schema, global_schema;"

This can be a great way of testing your new functions against existing


In response to

pgsql-novice by date

Next:From: Christian ArmeanuDate: 2004-09-22 23:26:47
Subject: Using PERFORM in plpgsql throws compile errors
Previous:From: Kumar SDate: 2004-09-22 18:01:41
Subject: DATE Error: COPY

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