Yeah, I thought of that (actually bytea *), but then you have to assume that bytea and text will always be typedef'ed to the same thing. (Is casting between different non-void pointer types, even if they are compatible, a warning/error in C? I can't remember.)