Re: ISSTRICT behavior

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Don Y <pgsql(at)DakotaCom(dot)Net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: ISSTRICT behavior
Date: 2006-05-04 07:23:05
Message-ID: 20060504072305.GC4752@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Don Y 2006-05-04 07:23:07 Re: ISSTRICT behavior
Previous Message Don Y 2006-05-04 07:19:12 Re: ISSTRICT behavior