If \fB@\fIname\fR is specified, then the UUID for \fIrecord\fR may be
referred to by that name later in the same \fBovs\-vsctl\fR
invocation in contexts where a UUID is expected.
+.IP
+Both \fB\-\-id\fR and the \fIcolumn\fR arguments are optional, but
+usually at least one or the other should be specified. If both are
+omitted, then \fBget\fR has no effect except to verify that
+\fIrecord\fR exists in \fItable\fR.
.
.IP "\fBset \fItable record column\fR[\fB:\fIkey\fR]\fB=\fIvalue\fR..."
Sets the value of each specified \fIcolumn\fR in the given
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include "command-line.h"
#include "compiler.h"
static void
pre_cmd_get(struct vsctl_context *ctx)
{
+ const char *id = shash_find_data(&ctx->options, "--id");
const char *table_name = ctx->argv[1];
const struct vsctl_table_class *table;
int i;
+ /* Using "get" without --id or a column name could possibly make sense.
+ * Maybe, for example, a ovs-vsctl run wants to assert that a row exists.
+ * But it is unlikely that an interactive user would want to do that, so
+ * issue a warning if we're running on a terminal. */
+ if (!id && ctx->argc <= 3 && isatty(STDOUT_FILENO)) {
+ VLOG_WARN("\"get\" command without row arguments or \"--id\" is "
+ "possibly erroneous");
+ }
+
table = pre_get_table(ctx, table_name);
for (i = 3; i < ctx->argc; i++) {
if (!strcasecmp(ctx->argv[i], "_uuid")