X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=FS%2FFS%2FRecord.pm;h=88d8ca9a348b2c5cfd89cbb2e135cd3b571f5cc0;hb=50a2633bf3c8e4be5bb1f6bdd4a2cc8bd6b954a9;hp=be29b5c8a73a6caeb6989a75e3c9353cca3bbb91;hpb=27af526f59996d1f1cb8f4181d4e320020c98062;p=freeside.git diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index be29b5c8a..88d8ca9a3 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -54,9 +54,14 @@ FS::UID->install_callback( sub { $conf = FS::Conf->new; $conf_encryption = $conf->exists('encryption'); $File::CounterFile::DEFAULT_DIR = $conf->base_dir . "/counters.". datasrc; + if ( driver_name eq 'Pg' ) { + eval "use DBD::Pg ':pg_types'"; + die $@ if $@; + } else { + eval "sub PG_BYTEA { die 'guru meditation #9: calling PG_BYTEA when not running Pg?'; }"; + } } ); - =head1 NAME FS::Record - Database record objects @@ -239,6 +244,9 @@ fine in the common case where there are only two parameters: my @records = qsearch( 'table', { 'field' => 'value' } ); +Also possible is an experimental LISTREF of PARAMS_HASHREFs for a UNION of +the individual PARAMS_HASHREF queries + ###oops, argh, FS::Record::new only lets us create database fields. #Normal behaviour if SELECT is not specified is `*', as in #C