On 4/17/05, Enrico Weigelt <[EMAIL PROTECTED]> wrote: > * Tom Lane <[EMAIL PROTECTED]> wrote: > > Enrico Weigelt <[EMAIL PROTECTED]> writes: > > > c) CREATE FUNCTION id2username(oid) RETURNS text > > > LANGUAGE 'SQL' IMMUTABLE AS ' > > > SELECT username AS RESULT FROM users WHERE uid = $1'; > > > > This is simply dangerous. The function is *NOT* immutable (it is > > stable though). When ... not if ... your application breaks because > > you got the wrong answers, you'll get no sympathy from anyone. > > In my case it is immutable. The username never changes. > Even if your data never changes it *can* change so the function should be at most stable not immutable.
regards, Jaime Casanova ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster