sqlayinfiles(1)SqLay Suitesqlayinfiles(1)

NAME

sqlayinfiles - an SQL file parsing driver for sqlay.

SYNOPSIS

libsqlayinfiles.so

[sqlaytool] [options] file:datasource

DESCRIPTION

sqlayinfiles is the SQL file parsing driver for sqlay. It currently supports only DDL read-only. It does its best to interprete a datasource in the form of an SQL DDL file, typically generated by a RDBMS dump utility like pg_dump or mysqldump.

It has been tested mainly with ( and originally designed for ) PostgreSQL but also, less extensively, with MySQL, mdbtools and Sybase.

INVOCATION

The driver is loaded and the datasource, actually a local file name, interpreted by feeding it to the sqlaytool front-end executable through a files: URL.

The files: prefix could be optional if the file name has an extension of .sql, ddl or dml.

Alternatively, the files proto name can be replaced by one of the following aliases: file, sql or dml.

Substitutions like   are not done on the path.

Parameters like table name / pattern must be separated from the path / file name by a double slash (//).

The SQL file could normally also be piped directly into the front-end executable through standard input.

OPTIONS

Here are options specific to this driver. Please, also refer to the sqlayin(1) man page for options common to all drivers.

FEATURES

Here are features not or partially supported by this driver. Please, also refer to the sqlayin(1) man page for features supported or not by all drivers.

The driver should be able to detect (especially on PostgreSQL) tables and columns not containing any white space in their names - otherwise those names would be silently truncated -, (commonly used) datatypes without their length and precision, primary and foreign keys defined as table constraints in the create table statement and (PostgreSQL only) non-composed foreign keys defined in (standard pg_dump format) create trigger statements, not null flags and presence of default values, (first column) of indexes defined in create index statements, a count of insert statements by table, comments on tables or columns defined in comment on statements, grants and revokes.

It does not detect views.

The count of lines of data per table is only made if data were dumped as INSERT's, not COPY's or LOAD's, thus by using the -s option of pg_dump or -d of mysqldump.

NOTES

As other input drivers for sqlay, the only connection available for now is a shared connection.

Pls understand that this is an alpha release and none of the executables is securized against buffer overflows, and so on. It is also not thread safe.

BUGS

A lot: the driver doesn't detect the RDBMS type, so performs lot of guesses and approximations.

Detection of keys is broken above PostgreSQL 7.2.

It is also very likely to crash on stored procedures or triggers, maybe on views.

See also the NOTE above for security warning.

AUTHOR

E. Lurquin <sqlay@hitud.net>

SEE ALSO

sqlayin(1), sqlay(1), sqlsc(1), sqlds(1), mysqldump(1), pg_dump(1), pg_dumpall(1)




sqlayinfiles 0.8Dec 2008sqlayinfiles(1)