Re: Prepared statements fail after schema changes with surprising error

From: "Dickson S(dot) Guedes" <listas(at)guedesoft(dot)net>
To: Peter van Hardenberg <pvh(at)pvh(dot)ca>
Cc: "pgsql-hackers(at)postgresql(dot)org Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Prepared statements fail after schema changes with surprising error
Date: 2013-01-22 01:17:20
Message-ID: CAHHcreoLBrcX7we3fpivrMXACHHry=naK3ptHy_P2D6c3OfbRg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2013/1/21 Peter van Hardenberg <pvh(at)pvh(dot)ca>:
> A user reported an interesting issue today. After restoring a dump created
> with --clean on a running application in his development environment his
> application started complaining of missing tables despite those tables very
> clearly existing.
>
> After a little thinking, we determined that this was due to the now-default
> behaviour of Rails to create prepared statements for most queries. The
> prepared statements error out because the old relation they point to is
> missing, but this gives a misleading report thus:
>
> PG::Error: ERROR: relation "xxx" does not exist

Isn't that something with search_path?

--
Dickson S. Guedes
mail/xmpp: guedes(at)guedesoft(dot)net - skype: guediz
http://github.com/guedes - http://guedesoft.net
http://www.postgresql.org.br

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-01-22 01:23:00 Re: CF3+4 (was Re: Parallel query execution)
Previous Message Michael Paquier 2013-01-22 00:54:50 Re: Request for vote to move forward with recovery.conf overhaul