Tom Lane wrote:
> Alvaro Herrera <alvhe...@commandprompt.com> writes:
> > BTW does "any" match other pseudotypes?  Would I be able to pass a
> > cstring into "any"?  That would create a large security hole I think.
> 
> How so?  'Cause you can do that now with anyelement.

Hmm, it doesn't seem to be allowed?

alvherre=# create function anyelem2 (anyelement) returns int language plpgsql 
as $$ begin return 1; end $$;
CREATE FUNCTION
alvherre=# select anyelem2(textout('oh'));
ERROR:  PL/pgSQL functions cannot accept type cstring
CONTEXTO:  compilation of PL/pgSQL function "anyelem2" near line 0


(BTW I find it a bit funny that lines are counted from 0.  I never
noticed that before).


> cstring is only a pseudotype for historical reasons, anyway --- there's
> nothing about it now that's not a real type.  I think we just have it
> that way to discourage people from storing it in tables.

Wow, it has I/O functions and all.  Amazing, I wasn't aware of that.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to