Re: FW: Double Quoting in Table names causing dynamic method access failures




-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


I agree that Class::DBI may be involved. However, the module Class::DBI
specifically is not installed.

There is no doubt that Class::DBI is intimately involved here. The error
is coming from:

/usr/lib/perl5/site_perl/5.8.8/Class/DBI/Loader/Generic.pm

In this file, the following method is called:
(In this method the value of $table is '"access"'; and I do mean '(double
quote)access(double quote)' (without the single quotes of course). The
double quoting of the table name is where the problem stems from.)
---- Begin Method ----
sub set_up_table {
my ( $class, $table, $opts ) = @_;
....
SELECT a.attname, a.attnum
FROM ${catalog}pg_class c, ${catalog}pg_attribute a
WHERE c.relname = ?

Yep, that's the problem. Looks like DBI::Class is mixing and matching
relation names. If they want to use the tablenames "raw" for use in
system catalogs, they should probably be getting the table names
themselves: I suspect they are getting them through DBI/DBD::Pg, which is
properly quoting them. The quotes are for people doing things like

$SQL = "UPDATE $table SET foo=12 WHERE foo=24";

The only time the quotes will mess things up is when people do things like
try to put those values directly into pg_class.

Alternatively, there are aready DBI methods to get the primary key
for a table: see primary_key_info. This looks like a Class::DBI bug:
they need to either get all the information themselves via the system
catalogs, or rely on DBI (via DBD::Pg) to get it for them. The mixing
and matching is causing the problems.

I'm not very familiar with Class::DBI, but I'd definitely check there
first, and see if this has been reported on a mailing list or a bug
report, or raise the issue on one or both yourself.

- --
Greg Sabino Mullane greg@xxxxxxxxxxxx
End Point Corporation
PGP Key: 0x14964AC8 200707311122
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iD8DBQFGr1PKvJuQZxSWSsgRAx0nAJ4h/OlaYMtXOF/G4Ys8lizHoNoR/gCbBj7R
px/gMXv6obk8Bgwph46+RfQ=
=meqs
-----END PGP SIGNATURE-----


.



Relevant Pages

  • Re: Report on a selected field value
    ... Quoting quotes is a confusing topic. ... DoCmd.OpenReport "EII_Report", acViewPreview,, strWhere ... EII_Acronym is the field I want the report based on. ... called up by the switchboard item "Location Report." ...
    (microsoft.public.access.reports)
  • RE: Creating a quote form
    ... CustomerID AutoNumber (Primary Key ) ... CustomerNumber Number (Foreign Key to Customers ) ... QuoteNumber Number (FK to Quotes) ... To print the report, which will no doubt have the Customer Name, the Product ...
    (microsoft.public.access.forms)
  • Re: Add ONE variable word to report header
    ... The reasons I suggested using the MsgBox instead of a prompt ... Place a Text Box in the report where you want the note. ... quotes problem you refer to here. ... The reason I want you to actually remove that code is to ...
    (microsoft.public.access.reports)
  • RE: How to pass param for IN() clause to sql command?
    ... Since this is a SqlCommand at it's heart, ... Now, if only I could take these individual query files and generate the DataSet from them easily, and then modify the definitions contained in my SSRS report files! ... I suppose it is being helpful and "fixing" my quotes to double quotes ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Some pro-gunners STILL confused by CDC report
    ... They were there to support my ... Some pro-gunners STILL confused by CDC report ... Old quotes from specific people with no recent quotes from those ...
    (talk.politics.guns)