Re: fetch_search_path() and elog.c - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: fetch_search_path() and elog.c
Date
Msg-id 20050711170437.GB21315@alvh.no-ip.org
Whole thread Raw
In response to Re: fetch_search_path() and elog.c  (Ferruccio Zamuner <nonsolosoft@diff.org>)
List pgsql-hackers
On Mon, Jul 11, 2005 at 06:22:26PM +0200, Ferruccio Zamuner wrote:

> Now I've found a simpler solution:
> 
> case 'S':
>                    /* estrae il search_path */
>              if (namespace_search_path != NULL)
>                appendStringInfo(buf, "%s ", namespace_search_path);
>              break;
> 
> It seems to work.
> 
> But I would like to understand why previous code was wrong.

I think it was because you were doing catalog lookups (the
get_namespace_name() function, etc), and these don't work outside a
transaction.

-- 
Alvaro Herrera (<alvherre[a]alvh.no-ip.org>)
"¿Cómo puedes confiar en algo que pagas y que no ves,
y no confiar en algo que te dan y te lo muestran?" (Germán Poo)


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: 4 pgcrypto regressions failures - 1 unsolved
Next
From: "Joshua D. Drake"
Date:
Subject: Possible better pg_ctl start/stop handling?