Re: [PATCH] "\ef " in psql - Mailing list pgsql-hackers

From Abhijit Menon-Sen
Subject Re: [PATCH] "\ef " in psql
Date
Msg-id 20080729101227.GA11196@toroid.org
Whole thread Raw
In response to Re: [PATCH] "\ef " in psql  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCH] "\ef " in psql  (Abhijit Menon-Sen <ams@oryx.com>)
List pgsql-hackers
At 2008-07-23 10:50:03 -0400, tgl@sss.pgh.pa.us wrote:
>
> > What would the function return? "CREATE OR REPLACE FUNCTION ..."?
> 
> I think I'd go with CREATE FUNCTION for simplicity.

OK, I have a mostly working pg_get_functiondef now, and some questions
about the remaining pieces:

1. Why is "prorows" a float4? Should I print it that way, i.e. "%f"?

2. Can I print the contents of "proconfig" as just "SET %s"? It seems  to work for the variables I've tried (e.g.
"DateStyle=iso"),but I  wonder if they'll always be quoted correctly (i.e., if the "split  on '='" thing pg_dump does
isnecessary for an 8.4 function).
 

3. Is there a function I can use from ruleutils.c to do dollar quoting  of prosrc/probin? If not, and I have to write
one,where should it  live?
 

4. What exactly is probin? Do I need to worry about it at all?

Thanks.

-- ams


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [WIP] patch - Collation at database level
Next
From: "Asko Oja"
Date:
Subject: Re: [PATCH] "\ef " in psql