Re: pg_stat_statements and non default search_path - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: pg_stat_statements and non default search_path
Date
Msg-id 379b1b93-e23e-be7a-e77d-b4db00fe932b@BlueTreble.com
Whole thread Raw
In response to pg_stat_statements and non default search_path  (Julien Rouhaud <julien.rouhaud@dalibo.com>)
Responses Re: pg_stat_statements and non default search_path  (Julien Rouhaud <julien.rouhaud@dalibo.com>)
List pgsql-hackers
On 10/7/16 4:39 AM, Julien Rouhaud wrote:
> I see two ways of fixing this. First one would be to store normalized
> queries while fully qualifiying the relation's names. After a quick look
> this can't be done without storing at least a token location in
> RangeTblEntry nodes, which sounds like a bad idea.
>
> The other way would be to store the value of search_path with each pgss
> entry (either in shared_memory or in the external file).
>
> Is it something that we should fix, and if yes is any of this
> acceptable, or does someone see another way to solve this problem?

Would another option be to temporarily set search_path to '' when 
getting the query text? ISTM that would be the best option.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)   mobile: 512-569-9461



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: proposal: psql \setfileref
Next
From: Jim Nasby
Date:
Subject: Re: Fast AT ADD COLUMN with DEFAULTs