pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Arnaud Lesauvage <arnaud.listes@codata.eu>
Cc: pgsql-odbc@postgresql.org, pgsql-general <pgsql-general@postgresql.org>
Subject: Re: 'default nextval()' loses schema-qualification in dump ?
Date: Tue, 06 Jul 2010 10:22:14 -0400
Message-ID: <27289.1278426134@sss.pgh.pa.us> (raw)
In-Reply-To: <4C32FF36.8030604@codata.eu>
References: <4C32FF36.8030604@codata.eu>

Arnaud Lesauvage <arnaud.listes@codata.eu> writes:
> After some research, we found in psqlODBC's log that before the restore 
> psqlODBC was getting the sequence's nextval with a schema qualified 
> call, and after the restore the call was not schema qualified.
> I checked in pg_attrdef before and after the dump/restore, and indeed 
> the "default nextval()" on this problematic table loses it's schema 
> qualification in the process.

This is a pretty inadequate description of your problem.  Let's see the
exact SQL you are dealing with.

Note that if the argument of nextval is a plain regclass constant, like
	nextval('seq'::regclass)
then the constant is in fact a reference to a specific sequence.
Whether it's displayed with a schema name depends on whether that
sequence is visible in your search_path.

			regards, tom lane



view thread (13+ messages)  latest in thread

Message-ID: <27289.1278426134@sss.pgh.pa.us>
Permalink:  ../27289.1278426134@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27289.1278426134@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: tgl@sss.pgh.pa.us, arnaud.listes@codata.eu, pgsql-general@postgresql.org
  Subject: Re: 'default nextval()' loses schema-qualification in dump ?
  In-Reply-To: <27289.1278426134@sss.pgh.pa.us>
  References: <4C32FF36.8030604@codata.eu> <27289.1278426134@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox