Thom Brown <thom@xxxxxxxxx> 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 -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general