Q:

Questions about several SQL commands

I am working on my database class project. I am reading the PostgreSQL Write-ahead-logging README, it mentioned several commands such as SQL commands 
BEGIN 
COMMIT 
ROLLBACK 
SAVEPOINT 
ROLLBACK  
RELEASE

In the SQL standard, I didn't see those commands. I am confused by that. What's the differences between those commands and standard "SELECT"? Could anyone tell me more about those commands? Can those commands be used the same way as standard SQL?

A:

The ANSI SQL Standard [http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt] is also your friend, and you can find these keywords defined there.
Generally all these keywords behave similarly across platforms, but beware the subtle differences in their function, performance or usage.
For example: SAVEPOPINT has similar meanings across different platforms (albeit possibly differing implementations or context), so you need to refer to your platform docs for specifics.
In this case, the Postgres 9.1 manual [http://www.postgresql.org/docs/9.1/] (the one I have bookmarked) ROLLBACK and RELEASE keywords are used together with other modifiers to apply to  a SAVEPOINT within a transaction.
OTOH: T-SQL (MS-SQL Server) requires SAVE|ROLLBACK TRANSACTION when operating on a SAVEPOINT [http://msdn.microsoft.com/en-us/library/ms188378.aspx].
Hope that helps!

