Re: Quotation

"H.Merijn Brand" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <[email protected]>
On Tue, 5 May 2009 15:54:48 +0100, Tim Bunce <[email protected]>
wrote:

> On Tue, May 05, 2009 at 01:49:10PM +0200, H.Merijn Brand wrote:
> > On Tue, 5 May 2009 12:08:53 +0100, Tim Bunce <[email protected]>
> > wrote:
> > 
> > > On Mon, May 04, 2009 at 04:06:47PM +0200, H.Merijn Brand wrote:
> > > > I've hit a failure, which I am not about if it is my fault or that I
> > > > have to blame something else
> > > > 
> > > >   $dbh->do ("drop table $_") for $dbh->tables ();
> > > > 
> > > > Now that DBI returns the tables quoted, I expect that to work.
> > > > 
> > > > DBD::CSV uses the current user name as schema name, so the table list
> > > > looks like
> > > > 
> > > >   $VAR1 = [
> > > >     '"merijn".testaa.csv',
> > > >     '"merijn".testab',
> > > >     '"merijn".testac',
> > > >     '"merijn".testad.txt',
> > > >     '"merijn".testae.csv',
> > > >     ];
> > > 
> > > [Ignoring the issue you're refering to]
> > > 
> > > Why should DBD::CSV support schemas at all?
> > 
> > Because it was in there from the start. (In fact it was in DBD::File).
> > Not that I /like/ it, nor see the use of it, but the default
> > schema-name for DBD-File is the owner of the folder in which the
> > datafile resides
> 
> That seems wrong. Schemas primarily provide namespaces. The association
> with username is mostly an accident of history.

Which IMHO I cannot remove bluntly as a judgement error.

> > > What value does that give?
> > 
> > beats me, but I'm sure I break things if I simply remove it
> > 
> > > What use-cases does it help?
> > 
> > I have just implemented f_schema in DBD::File, so I can disable the
> > darn thing with { f_schema => undef }
> 
> Ah, ok. That's a good thing :)
> 
> > > What are the semantics of 'schemas' in DBD::CSV?
> > 
> > none that I am aware of
> 
> There must be some...
> 1. when reading metadata, the default schema-name is the owner of the
>     folder in which the datafile resides

With DBD::CSV, I bet all the files are owned by the same person (that
also owns the folder). If applications rely on folder ownership for
schema names, I have lost it there ... :)

> 2. when refering to a table name in an SQL statement
>     the schema portion is... ignored?

yes .... I think
/me quickly adds a todo test for DBD::CSV to check that

> p.s. You've missed DBI 1.608 but hopefully the gap before 1.609 won't be
> as large.

I'll sync and commit then
I have to wait for SQL::Statement anyway

Still writing tests and tests and tests (otherwise I would never have
found these stupid errors)

-- 
H.Merijn Brand  http://tux.nl      Perl Monger  http://amsterdam.pm.org/
using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00,
11.11, 11.23, and 11.31, OpenSuSE 10.3, 11.0, and 11.1, AIX 5.2 and 5.3.
http://mirrors.develooper.com/hpux/           http://www.test-smoke.org/
http://qa.perl.org      http://www.goldmark.org/jeff/stupid-disclaimers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.