On Mar 16, Ingo Strüwing wrote:
> Rafal Somla, 16.03.2009 07:20:
> > Then RESTORE should read and log the comment from
> > the backup image. Since RESTORE reads comment from the image, there is
> > no point in adding COMMENT option to it.
> I can think of two valuable uses of a COMMENT clause in the RESTORE
> statement. Unfortunately they exclude each other:
> 1. The user may want to have an option to double check that he selected
> the right backup image file. The comment must match the one from the
> file. If he wants to restore anyway, he can leave out the COMMENT
> clause. This option can be implemented only after a change of the backup
> image file format, which doesn't seem to be due soon.
> 2. The restore comment may be a valuable documentation for why the
> restore became necessary. This option is implemented by Chuck.
I only see the need for the first one. That's what generally COMMENT
keyword does for other objects, e.g. COMMENT in the CREATE TABLE adds a
comment to the table, not tells "why a create table became necessary".
For the latter you write a comment, like
CREATE TABLE ... ( ... ) /* Just learning how to use comments */
That is - COMMENT keyword adds a comment to the object, /* ... */
braces (or -- ... or #..., whatever) add a comment to the statement.
Regards / Mit vielen Grüßen,
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ Principal Software Engineer/Server Architect
/_/ /_/\_, /___/\___\_\___/ Sun Microsystems GmbH, HRB München 161028
<___/ Sonnenallee 1, 85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Häring