Skip to content

Commit e61e4d4

Browse files
committed
Fix for psql control-d and .psqlrc that I broke. Fix for \dT with
descriptions enabled.
1 parent db12a63 commit e61e4d4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/bin/psql/describe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ describeTypes(const char *name, PsqlSettings *pset)
158158
descbuf[0] = '\0';
159159
strcat(descbuf, "SELECT typname AS \"Type\"");
160160
if (GetVariableBool(pset->vars, "description"))
161-
strcat(descbuf, ", obj_description(p.oid) as \"Description\"");
161+
strcat(descbuf, ", obj_description(oid) as \"Description\"");
162162
strcat(descbuf, "\nFROM pg_type\n"
163163
"WHERE typrelid = 0 AND typname !~ '^_.*'\n");
164164

src/bin/psql/mainloop.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,10 @@ MainLoop(PsqlSettings *pset, FILE *source)
136136
if (line == NULL)
137137
{
138138
if (GetVariableBool(pset->vars, "echo") && !GetVariableBool(pset->vars, "quiet"))
139-
puts("EOF\n");
140-
else
141-
puts(""); /* put out newline */
139+
puts("EOF");
140+
else if (pset->cur_cmd_interactive)
141+
puts(""); /* just newline */
142+
142143
eof = true;
143144
continue;
144145
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy