<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.30 2000/03/27 17:14:43 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.31 2000/04/16 15:46:39 petere Exp $
Postgres documentation
-->
<varlistentry>
- <term><literal>\do [ <replaceable class="parameter">pattern</replaceable> ]</literal></term>
+ <term><literal>\do [ <replaceable class="parameter">name</replaceable> ]</literal></term>
<listitem>
<para>
Lists available operators with their operand and return types.
- If <replaceable class="parameter">pattern</replaceable>
+ If <replaceable class="parameter">name</replaceable>
is specified, only operators with that name will be shown.
- (Since this is a regular expression, be sure to quote all special
- characters in you operator name with backslashes. To prevent
- interpretation of the backslash as a new command, you might also
- wish to quote the argument.)
</para>
</listitem>
</varlistentry>
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.29 2000/04/14 23:43:44 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.30 2000/04/16 15:46:40 petere Exp $
*/
#include "postgres.h"
#include "command.h"
status = exec_command(new_cmd, my_line + 1, &continue_parse, query_buf);
+#if 0 /* turned out to be too annoying */
if (status != CMD_UNKNOWN && isalpha(new_cmd[0]))
psql_error("Warning: this syntax is deprecated\n");
+#endif
}
if (status == CMD_UNKNOWN)
bool quiet = QUIET();
backslashResult status = CMD_SKIP_LINE;
char *string,
- *string_cpy;
+ *string_cpy,
+ *val;
/*
* The 'string' variable will be overwritten to point to the next
status = CMD_ERROR;
/* eat the rest of the options string */
- while (scan_option(&string, OT_NORMAL, NULL));
+ while ((val = scan_option(&string, OT_NORMAL, NULL)))
+ psql_error("\\%s: extra argument '%s' ignored\n", cmd, val);
if (options_string && continue_parse)
*continue_parse = options_string + (string - string_cpy);
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.19 2000/04/12 17:16:22 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.20 2000/04/16 15:46:40 petere Exp $
*/
#include "postgres.h"
#include "describe.h"
if (name)
{
- strcat(buf, " AND a.aggname ~* '^");
+ strcat(buf, " AND a.aggname ~ '^");
strncat(buf, name, REGEXP_CUTOFF);
strcat(buf, "'\n");
}
if (name)
{
- strcat(buf, " AND a.aggname ~* '^");
+ strcat(buf, " AND a.aggname ~ '^");
strncat(buf, name, REGEXP_CUTOFF);
strcat(buf, "'\n");
}
if (name)
{
- strcat(buf, " AND p.proname ~* '^");
+ strcat(buf, " AND p.proname ~ '^");
strncat(buf, name, REGEXP_CUTOFF);
strcat(buf, "'\n");
}
if (name)
{
- strcat(buf, " AND t.typname ~* '^");
+ strcat(buf, " AND t.typname ~ '^");
strncat(buf, name, REGEXP_CUTOFF);
strcat(buf, "' ");
}
" o.oprright = t2.oid\n");
if (name)
{
- strcat(buf, " AND o.oprname ~ '^");
+ strcat(buf, " AND o.oprname = '");
strncat(buf, name, REGEXP_CUTOFF);
strcat(buf, "'\n");
}
" o.oprright = t1.oid\n");
if (name)
{
- strcat(buf, "AND o.oprname ~ '^");
+ strcat(buf, "AND o.oprname = '");
strncat(buf, name, REGEXP_CUTOFF);
strcat(buf, "'\n");
}
" o.oprleft = t1.oid\n");
if (name)
{
- strcat(buf, "AND o.oprname ~ '^");
+ strcat(buf, "AND o.oprname = '");
strncat(buf, name, REGEXP_CUTOFF);
strcat(buf, "'\n");
}
"WHERE a.oid = d.objoid\n");
if (object)
{
- strcat(descbuf, " AND a.aggname ~* '^");
+ strcat(descbuf, " AND a.aggname ~ '^");
strncat(descbuf, object, REGEXP_CUTOFF);
strcat(descbuf, "'\n");
}
"WHERE p.oid = d.objoid AND (p.pronargs = 0 or oidvectortypes(p.proargtypes) != '')\n");
if (object)
{
- strcat(descbuf, " AND p.proname ~* '^");
+ strcat(descbuf, " AND p.proname ~ '^");
strncat(descbuf, object, REGEXP_CUTOFF);
strcat(descbuf, "'\n");
}
"WHERE RegprocToOid(o.oprcode) = d.objoid\n");
if (object)
{
- strcat(descbuf, " AND o.oprname ~ '^");
+ strcat(descbuf, " AND o.oprname = '");
strncat(descbuf, object, REGEXP_CUTOFF);
strcat(descbuf, "'\n");
}
"WHERE t.oid = d.objoid\n");
if (object)
{
- strcat(descbuf, " AND t.typname ~* '^");
+ strcat(descbuf, " AND t.typname ~ '^");
strncat(descbuf, object, REGEXP_CUTOFF);
strcat(descbuf, "'\n");
}
"WHERE c.oid = d.objoid\n");
if (object)
{
- strcat(descbuf, " AND c.relname ~* '^");
+ strcat(descbuf, " AND c.relname ~ '^");
strncat(descbuf, object, REGEXP_CUTOFF);
strcat(descbuf, "'\n");
}
"WHERE r.oid = d.objoid AND r.rulename !~ '^_RET'\n");
if (object)
{
- strcat(descbuf, " AND r.rulename ~* '^");
+ strcat(descbuf, " AND r.rulename ~ '^");
strncat(descbuf, object, REGEXP_CUTOFF);
strcat(descbuf, "'\n");
}
"WHERE t.oid = d.objoid\n");
if (object)
{
- strcat(descbuf, " AND t.tgname ~* '^");
+ strcat(descbuf, " AND t.tgname ~ '^");
strncat(descbuf, object, REGEXP_CUTOFF);
strcat(descbuf, "'\n");
}