summaryrefslogtreecommitdiff
path: root/src/bin/psql/command.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-08-14 14:20:35 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2010-08-14 14:20:35 +0000
commit41b810fe325663d84188220f5af911972d4e4c6e (patch)
treeeca23e06c18feb26ce3b8623ffb958a809a6346e /src/bin/psql/command.c
parentb6e06942c6b880b79097049757a8d140cd4316c0 (diff)
Fix \ef and \sf to not fail on functions with nonnull probin.
Update comment about them in pg_get_functiondef.
Diffstat (limited to 'src/bin/psql/command.c')
-rw-r--r--src/bin/psql/command.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index e902f5e95c0..a482010157b 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2010, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.227 2010/08/14 13:59:49 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.228 2010/08/14 14:20:35 tgl Exp $
*/
#include "postgres_fe.h"
#include "command.h"
@@ -611,17 +611,17 @@ exec_command(const char *cmd,
/*
* lineno "1" should correspond to the first line of the
* function body. We expect that pg_get_functiondef() will
- * emit that on a line beginning with "AS $function", and that
- * there can be no such line before the real start of the
- * function body. Increment lineno by the number of lines
- * before that line, so that it becomes relative to the first
- * line of the function definition.
+ * emit that on a line beginning with "AS ", and that there
+ * can be no such line before the real start of the function
+ * body. Increment lineno by the number of lines before that
+ * line, so that it becomes relative to the first line of the
+ * function definition.
*/
const char *lines = query_buf->data;
while (*lines != '\0')
{
- if (strncmp(lines, "AS $function", 12) == 0)
+ if (strncmp(lines, "AS ", 3) == 0)
break;
lineno++;
/* find start of next line */
@@ -1150,9 +1150,9 @@ exec_command(const char *cmd,
/*
* lineno "1" should correspond to the first line of the
* function body. We expect that pg_get_functiondef() will
- * emit that on a line beginning with "AS $function", and that
- * there can be no such line before the real start of the
- * function body.
+ * emit that on a line beginning with "AS ", and that there
+ * can be no such line before the real start of the function
+ * body.
*
* Note that this loop scribbles on func_buf.
*/
@@ -1160,7 +1160,7 @@ exec_command(const char *cmd,
{
char *eol;
- if (in_header && strncmp(lines, "AS $function", 12) == 0)
+ if (in_header && strncmp(lines, "AS ", 3) == 0)
in_header = false;
/* increment lineno only for body's lines */
if (!in_header)