Re: ruleutils with pretty-print option - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: ruleutils with pretty-print option
Date
Msg-id 200307272011.h6RKBWH18647@candle.pha.pa.us
Whole thread Raw
In response to Re: ruleutils with pretty-print option  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: ruleutils with pretty-print option  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Are these illustrating a problem with the function definition, or is it
> > happening because it is the first time we are calling the same function
> > with one and more than one parameter?
>
> The function definition is broken.  While it could be fixed (by
> explicitly testing fcinfo->nargs, rather than assuming positions
> beyond nargs are valid) I am not willing to remove the opr_sanity
> check that is complaining.  Accordingly, a better solution would be
> to make two C-code wrapper functions, one for the single-parameter
> and one for the two-parameter case of each function.

Tom, how do I pass PG_FUNCTION_ARGS to another function, while adding a
new parameter?  Would it be better to declare SQL functions to call new
functions with a prettyprint parameter of false?

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: ruleutils with pretty-print option
Next
From: Tom Lane
Date:
Subject: Re: Eliminate information_schema from oid2name listing