From e61e4d460c4073688bf64140b6a59a05ac0857f0 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sat, 13 Nov 1999 19:16:47 +0000 Subject: [PATCH] Fix for psql control-d and .psqlrc that I broke. Fix for \dT with descriptions enabled. --- src/bin/psql/describe.c | 2 +- src/bin/psql/mainloop.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 5e40779cd1..6af2b06a8b 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 b43926577d..3db4a45901 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; } -- 2.40.0