Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

\p \g ; commit

283 views
Skip to first unread message

nikki

unread,
Sep 7, 1999, 3:00:00 AM9/7/99
to
Hi. Can anyone tell me the what these (\p \g ; commit) do in a
multi_query script? I've read the documentation but am not certain
the implications of each of these alone and in certain combinations.

For example, if I have a file called sample.sql containing the
following 2 queries and do "sql database1 < sample.sql", when do the
commit(s) happen? Can \p or \g imply a commit?

select * from parts;
select * from supplies;

Any comments are welcome.

thanks

Richard David

unread,
Sep 7, 1999, 3:00:00 AM9/7/99
to
Nikki,

Please read:- Appendix B Terminal Monitor, Ingres SQL Reference Guide.

The Ingres Documentation Set can be located at:-
http://www.cai.com/products/ingres/documentation_set.htm


Terrance Richard Boyes

unread,
Sep 7, 1999, 3:00:00 AM9/7/99
to
nikki <tony....@dal.ca> wrote:
> Hi. Can anyone tell me the what these (\p \g ; commit) do in a
> multi_query script? I've read the documentation but am not certain
> the implications of each of these alone and in certain combinations.

\p - Print the query before executing
\g - Go - run the sql above

> For example, if I have a file called sample.sql containing the
> following 2 queries and do "sql database1 < sample.sql", when do the
> commit(s) happen? Can \p or \g imply a commit?

\g can "imply" a commit _iff_ you have autocommit on. Otherwise
commits only happen at the end of the script (if you don't have
a rollback first) or whereever you place a commit.

NB however that in a multi-statement script you have to be _very_
careful about what happens on Error.

There was a fairly in-depth discussion of this here some months
ago (check Deja).

--
<URL:http://www.pierrot.co.uk/> Team AMIGA
You'll be sorry.


0 new messages