Domingo Alvarez Duarte <[EMAIL PROTECTED]> writes:
> When trying write a function in plpgsql I'm getting behavior that
> probably isn't the corect one.

It works as expected if you declare v_sep as varchar rather than char.

I think plpgsql may be interpreting
        v_sep           char;
as declaring v_sep to be the internal 1-byte "char" type, not char(n)
with unspecified length as you are expecting.  There's definitely
something strange going on with the assignment
        v_sep := '''';

In any case it's a tad bizarre to use char rather than varchar for
something that you intend to have varying width, no?

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to