On Mon 02 Feb 2004 18:53, Jeff Zucker <[EMAIL PROTECTED]> wrote: > Tim Bunce wrote: > > >It's 2004 and we can't even write VARCHAR(1024). How sad is that? > > > > > How about using Perl in the script that executes the SQL? > > $sql_create =~ s/VARCHAR(1024)/TEXT/gi if $dsn =~ /dbi:(mysql/i;
Where do these $sql_create's come from? If it wehere user code, it'd probably better be $sql_create =~ s/\bVARCHAR\s*(1024)/TEXT/gi if $dsn =~ /dbi:(mysql|unify)/i; > $sql_create =~ s/VARCHAR(1024)/BLOB/gi if $dsn ... > > Oh, and BTW, the ALTER TABLE statements won't work with DBD::SQLite - it > doesn't support ALTER TABLE at all and FOREIGN KEY constraints only ALTER TABLE is supported in Unify as of Unify-8.2, but the syntax is not 100% the same as Oracle (but who'd expected that in a world full of standards) Jeff and Thomas both got my example code on dealing with this > partially (it parses the constraints but doesn't enforce them). I'm > just having the script ignore complaints about ALTER TABLE. If we use > examples that depend on the constraints, we'll just have to have a > caveat for SQLite. -- H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/) using perl-5.6.1, 5.8.0 & 633 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3, WinNT 4, Win2K pro & WinCE 2.11 often with Tk800.024 &/| DBD-Unify ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/