declare expand_barcode to be STABLE
authorGalen Charlton <gmc@esilibrary.com>
Wed, 26 Aug 2009 19:00:28 +0000 (19:00 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 26 Aug 2009 19:00:28 +0000 (19:00 +0000)
As noticed by Jason, doing this gives a signficant
performance boost.

sql/base/base.sql

index 6ae7e39..3c12cc3 100644 (file)
@@ -593,4 +593,4 @@ CREATE OR REPLACE FUNCTION migration_tools.expand_barcode (TEXT, TEXT, INTEGER,
     return $barcode if (length($prefix) + length($new_barcode) + length($suffix)) > $maxlen;
 
     return "$prefix$new_barcode$suffix";
-$$ LANGUAGE PLPERL;
+$$ LANGUAGE PLPERL STABLE;