Use UNKNOWN with PL/Perl spi_prepare()? - Mailing list pgsql-hackers

From David E. Wheeler
Subject Use UNKNOWN with PL/Perl spi_prepare()?
Date
Msg-id 30D6137D-B0A4-4769-9EFB-FFE4B9BFB06F@kineticode.com
Whole thread Raw
Responses Re: Use UNKNOWN with PL/Perl spi_prepare()?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hackers,

I tried this:
   try=# create or replace function try() returns void language plperl as $$        spi_prepare('select length($1)',
'unknown');  $$;   CREATE FUNCTION   try=# select try();   ERROR:  error from Perl function "try": failed to find
conversionfunction from unknown to text at line 2. 

I could figure out no way to specify an that a data type is unknown (as opposed to known to be "unknown"). Specifying 0
doesn'twork, either: 
   try=# create or replace function try() returns void language plperl as $$        spi_prepare('select length($1)',
0);  $$;   CREATE FUNCTION   try=# select try();   ERROR:  error from Perl function "try": syntax error at or near "0"
atline 2. 

Is there a way to do this? If not, should there be?

Thanks,

David

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Win32 timezone matching
Next
From: Tom Lane
Date:
Subject: Re: Use UNKNOWN with PL/Perl spi_prepare()?