On 04/12/06, Mark Kirkwood <[EMAIL PROTECTED]> wrote:
Paul Mason wrote:
> If by "command terminator" you mean "thing that causes the current SQL
> to execute" then no that's not what ";" does. What ";" does is
> separate SQL commands. \g (or \go) executes the current command
> buffer. If you want to have more than one SQL command in your buffer
> then you need to separate them with ";"s
>
>
Right - I guess I wasn't very clear (again, sorry). For most folk coming
to Ingres from other databases this '\go' send buffer business is weird.
For instance, taking the usual suspects (Postgres, Mysql, Firebird):
their basic client uses ';' to separate the statements, and they are
executed as each ';' is encountered. In a script setting this is still
true and the client knows no more commands are coming when EOF is
encountered.
Now I know that folks are going to say "'sql' works its own way and
there is nothing wrong with it". I guess I'm saying "Ingres needs a
command line client that works similarly to the main open source
competitors".
There are other good reasons for this too: Where I used to work they
built web apps for customers and quite often re-used schema scripts. It
was very handy that scripts written against (say) Mysql could often be
run on Postgres or Firebird or even DB2 and SQLServer without
modification (demos could be easily run on customers database software).
Now sure, is some cases there where syntax will be incompatible - but
they would have got might annoyed to have to add '\go' to the tail of
there scripts for Ingres, and take it off for everything else!
Erm. I don't wish to be rude but I find it hard to take this objection
seriously.
sed 's/;/\\g/' ingres_schema.sql > other_schema.sql
sed 's/\\g/;/' other_schema.sql > ingres_schema.sql
Sorry but this is way way down the list of things to worry about when
porting from one DBMS (or MySQL) to another. Not least non-standard
SQL syntax, never mind how it's executed.
There's been a lot of work, and continues to be, to make it easier to
port to Ingres from other DBMSs - but this really is trivial.
And if you really don't like it, terminal monitor is probably one of
the easier things to modify. Or you could write your own. Or you could
use a JDBC or ODBC one.
--
Paul Mason
_______________________________________________
Users mailing list
Users@lists.ingres.com
http://lists.ingres.com/mailman/listinfo/users