On Mon, Aug 10, 2015 at 1:10 PM, Steve Thames sthame...@gmail.com wrote:
Please consider making the arbitrary determination of search_path by pg_dump
an optional behavior. Or better yet, just have it generate a backup that
accurately reflects the database it is backing up.
Hmm, I don't think
Lane [mailto:t...@sss.pgh.pa.us]
Sent: Tuesday, August 11, 2015 10:41 AM
To: Alvaro Herrera
Cc: Steve Thames; pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] pg_dump and search_path
Alvaro Herrera alvhe...@2ndquadrant.com writes:
Don't ever rely on adsrc. It's useless. Use pg_get_expr(adbin
Alvaro Herrera alvhe...@2ndquadrant.com writes:
Don't ever rely on adsrc. It's useless. Use pg_get_expr(adbin)
instead. That's safe, for instance, if the sequence gets renamed.
It's probably past time we got rid of that column altogether. It just
wastes space and cycles. There was an
Robert Haas robertmh...@gmail.com writes:
On Mon, Aug 10, 2015 at 1:10 PM, Steve Thames sthame...@gmail.com wrote:
Please consider making the arbitrary determination of search_path by pg_dump
an optional behavior. Or better yet, just have it generate a backup that
accurately reflects the
Steve Thames wrote:
SELECT a.attnum, n.nspname, c.relname, d.adsrc AS default_value
FROM pg_attribute AS a
JOIN pg_class AS c ON a.attrelid = c.oid
JOIN pg_namespace AS n ON c.relnamespace = n.oid
LEFT JOIN pg_attrdef AS d ON d.adrelid = c.oid AND d.adnum
Steve Thames wrote:
Thank you gentlemen for clarifying this.
I found this problem when my database modeling tool saw a change in the
database (the nextval() parameters) after a database restore.
I guess the tool must be reading adsrc for this information.
You can tell for sure by setting
I earliest reference I found to this issue is here
http://postgresql.nabble.com/set-search-path-in-dump-output-considered-harm
ful-td1947594.html and refers to the search_path being arbitrarily set in
the file created by pg_dump. This is apparently still the case in 9.4.
I found this issue
As I mentioned in the last post to a thread in general detailing some of the hurdles of attempting to set up PostgreSQL virtual hosting, we've had to hack pg_dump to achieve the behavior that we want.The modifications we made call into question (for us, anyway) a few design decisions in PostgreSQL
Thomas F. O'Connell [EMAIL PROTECTED] writes:
Our first attempt to get things working was to remove all calls to
selectSourceSchema. Clearly, this is playing with fire,
No, it's breaking it entirely; and so would your proposed change.
The reason for the restrictive search path is to ensure that