Commit e61e4d46 authored by Bruce Momjian's avatar Bruce Momjian

Fix for psql control-d and .psqlrc that I broke. Fix for \dT with

descriptions enabled.
parent db12a63e
...@@ -158,7 +158,7 @@ describeTypes(const char *name, PsqlSettings *pset) ...@@ -158,7 +158,7 @@ describeTypes(const char *name, PsqlSettings *pset)
descbuf[0] = '\0'; descbuf[0] = '\0';
strcat(descbuf, "SELECT typname AS \"Type\""); strcat(descbuf, "SELECT typname AS \"Type\"");
if (GetVariableBool(pset->vars, "description")) 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" strcat(descbuf, "\nFROM pg_type\n"
"WHERE typrelid = 0 AND typname !~ '^_.*'\n"); "WHERE typrelid = 0 AND typname !~ '^_.*'\n");
......
...@@ -136,9 +136,10 @@ MainLoop(PsqlSettings *pset, FILE *source) ...@@ -136,9 +136,10 @@ MainLoop(PsqlSettings *pset, FILE *source)
if (line == NULL) if (line == NULL)
{ {
if (GetVariableBool(pset->vars, "echo") && !GetVariableBool(pset->vars, "quiet")) if (GetVariableBool(pset->vars, "echo") && !GetVariableBool(pset->vars, "quiet"))
puts("EOF\n"); puts("EOF");
else else if (pset->cur_cmd_interactive)
puts(""); /* put out newline */ puts(""); /* just newline */
eof = true; eof = true;
continue; continue;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment