Re: psql setenv command - Mailing list pgsql-hackers

From Josh Kupershmidt
Subject Re: psql setenv command
Date
Msg-id CAK3UJRHT-+OtunBxm+6m1WH4Fn-HXqsLQE-cfiRM1mrYeeVaYg@mail.gmail.com
Whole thread Raw
In response to Re: psql setenv command  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: psql setenv command  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Sat, Nov 26, 2011 at 11:02 AM, Andrew Dunstan <andrew@dunslane.net> wrote:
>> Also, should the malloc() of newval just use pg_malloc() instead?
>
> Yes, also done.

This bit is unnecessary, since pg_malloc() takes care of the error handling:

+            if (!newval)
+            {
+                psql_error("out of memory\n");
+                exit(EXIT_FAILURE);
+            }


Also, the help output for setenv bleeds over an 80-character terminal,
and it seems the rest of the help outputs try to stay under this
limit. And an OCD nitpick: most of the psql-ref.sgml examples show
'testdb' at the prompt, how about we follow along.

 Other than those small gripes, the patch looks fine. Attached is an
updated version to save you some keystrokes.

Josh

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Patch: add timing of buffer I/O requests
Next
From: Bruce Momjian
Date:
Subject: Allow pg_dumpall to use dumpmem.c functions, simplify exit code