[ic] Shared Tables Not Always in %Sql
Mike Heins
mike at perusion.com
Wed Jan 14 08:56:33 EST 2004
Quoting John Young (john_young at sonic.net):
>
> I'm chasing down an intermittent problem accessing database handles
> using %Sql (sometimes the table is shared, and sometimes it isn't),
> and am wondering if the following would be desirable:
>
> (I lengthened the diff in order to show the entire block)
>
>
> --- Interpolate.pm.2.201 Wed Jan 14 03:05:29 2004
> +++ Interpolate.pm Wed Jan 14 03:11:07 2004
> @@ -1842,26 +1842,26 @@
> if($tables) {
> my (@tab) = grep /\S/, split /\s+/, $tables;
> foreach my $tab (@tab) {
> - next if $Db{$tab};
> + next if $Sql{$tab} && $Db{$tab};
> my $db = database_exists_ref($tab);
> next unless $db;
> $db = $db->ref();
> if($db->config('type') == 10) {
> my @extra_tabs = $db->_shared_databases();
> push (@tab, @extra_tabs);
> }
> if($hole) {
> $Sql{$tab} = $hole->wrap($db->dbh())
> if $db->can('dbh');
> $Db{$tab} = $hole->wrap($db);
> if($db->config('name') ne $tab) {
> $Db{$db->config('name')} = $Db{$tab};
> }
> }
> else {
> $Sql{$tab} = $db->[$Vend::Table::DBI::DBI]
> if $db =~ /::DBI/;
> $Db{$tab} = $db;
> }
> }
> }
>
Does this solve the "Cannot find object method st via package DBD::Pg"
problem? If it does, then it assuredly would be desirable. 8-)
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.647.1295 <mike at perusion.com>
Any man who is under 30, and is not liberal, has not heart; and any man
who is over 30, and is not a conservative, has not brains.
-- Winston Churchill
More information about the interchange-users
mailing list