aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/psql/describe.c2
-rw-r--r--src/bin/psql/mainloop.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 5e40779cd16..6af2b06a8b5 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -158,7 +158,7 @@ describeTypes(const char *name, PsqlSettings *pset)
descbuf[0] = '\0';
strcat(descbuf, "SELECT typname AS \"Type\"");
if (GetVariableBool(pset->vars, "description"))
- strcat(descbuf, ", obj_description(p.oid) as \"Description\"");
+ strcat(descbuf, ", obj_description(oid) as \"Description\"");
strcat(descbuf, "\nFROM pg_type\n"
"WHERE typrelid = 0 AND typname !~ '^_.*'\n");
diff --git a/src/bin/psql/mainloop.c b/src/bin/psql/mainloop.c
index b43926577db..3db4a459014 100644
--- a/src/bin/psql/mainloop.c
+++ b/src/bin/psql/mainloop.c
@@ -136,9 +136,10 @@ MainLoop(PsqlSettings *pset, FILE *source)
if (line == NULL)
{
if (GetVariableBool(pset->vars, "echo") && !GetVariableBool(pset->vars, "quiet"))
- puts("EOF\n");
- else
- puts(""); /* put out newline */
+ puts("EOF");
+ else if (pset->cur_cmd_interactive)
+ puts(""); /* just newline */
+
eof = true;
continue;
}