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

Re: psql: no schema info

From: Richard Huxton <dev(at)archonet(dot)com>
To: chester c young <chestercyoung(at)yahoo(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, sql pgsql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: psql: no schema info
Date: 2008-04-28 07:30:09
Message-ID: 48157D01.5050405@archonet.com (view raw or flat)
Thread:
Lists: pgsql-sql
chester c young wrote:
> using 8.2 and 8.3
> 
> here's (psychological) problem as I see it:
> 
> # set search_path=old_schema;
> #
> # create sequence new_schema.seq1;
> #
> # create table new_schema.table1(
> #    col1 integer default nextval( 'seq1' )
> # );
> 
> using old_schema.seq1, not new_schema.seq1
> 
> and imho to make matters more difficult to troubleshoot:
> 
> # \dt table1 -> does not show which schema for seq1

Must admit I thought you were wrong, but having tested it, I think I see 
what you mean.

If the schema in question is in the search_path then it doesn't get 
displayed. If you've forgotten what your search_path is set to then that 
can cause confusion.

Not a problem I see much of since I very rarely change my search_path. I 
  refer to schema.table by preference.

-- 
   Richard Huxton
   Archonet Ltd

In response to

Responses

pgsql-sql by date

Next:From: Emi LuDate: 2008-04-28 13:19:03
Subject: Re: trim(both) problem?
Previous:From: Alvaro HerreraDate: 2008-04-28 00:05:41
Subject: Re: psql: no schema info

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