Re: Referring to function parameter in function - Mailing list pgsql-general

From Tom Lane
Subject Re: Referring to function parameter in function
Date
Msg-id 28853.1284765293@sss.pgh.pa.us
Whole thread Raw
In response to Referring to function parameter in function  (Thom Brown <thom@linux.com>)
Responses Re: Referring to function parameter in function  (Thom Brown <thom@linux.com>)
List pgsql-general
Thom Brown <thom@linux.com> writes:
> ERROR:  invalid input syntax for integer: "bitlength"
> LINE 1: SELECT GET_BIT(from_value::bit(bitlength), tap.value-1)
>                                    ^

> I want to use the parameter called "bitlength" as the length of a bit
> when casting a value.

Hm, you can't ... that's not a valid place for a parameter.  You'd have
to EXECUTE a built-up string.

            regards, tom lane

pgsql-general by date:

Previous
From: Thom Brown
Date:
Subject: Referring to function parameter in function
Next
From: Thom Brown
Date:
Subject: Re: Referring to function parameter in function