Search Postgresql Archives

Re: ISSTRICT behavior

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 04, 2006 at 12:19:12AM -0700, Don Y wrote:
> I'm not designing for the "traditional" role that you're
> used to so I can do whatever makes sense for this product
> and just *define* that as it's behavior.  Since there are
> no other products that compete with it, users don't
> really have much choice!  :>

You can do what you like, however, it's still not clear to me what you
think the problem is. If you want your functions to be declared STRICT,
provide a .sql file that does that. It you want to program defensivly
and not crash if the user declares the function without STRICT, add:

if( PG_ARGISNULL(...) )
	PG_RETURN_NULL();

Which has exactly the same effect. Of course, users could screw up the
data-types also so you could, if you wanted, add more code to check the
datatypes passed.

Fact is, if the user has superuser priveledges, they can create C
functions any way they like. If you want to protect from that you need
to add stuff to your C function.

Have a ncie day,
-- 
Martijn van Oosterhout   <kleptog@xxxxxxxxx>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux