Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bjv9v-0006ms-3N for pgsql-bugs@arkaria.postgresql.org; Tue, 13 Sep 2016 21:22:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bjv9u-0002kr-KO for pgsql-bugs@arkaria.postgresql.org; Tue, 13 Sep 2016 21:22:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bjv9G-0001x4-T6 for pgsql-bugs@postgresql.org; Tue, 13 Sep 2016 21:21:46 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bjv9E-0002gA-1M for pgsql-bugs@postgresql.org; Tue, 13 Sep 2016 21:21:46 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u8DLLche017048; Tue, 13 Sep 2016 17:21:38 -0400 From: Tom Lane To: Keith Fiske cc: Marko Tiikkaja , Keith , Andres Freund , "pgsql-bugs@postgresql.org" Subject: Re: BUG #14322: Possible inconsistent behavior with timestamp_to_str() In-reply-to: References: <20160909235448.20021.79001@wrigleys.postgresql.org> <20160910000204.mbbfdxtw4t4oelzs@alap3.anarazel.de> <28770.1473799942@sss.pgh.pa.us> <08129d47-7952-dff2-e9e9-8a1b2bf706bd@joh.to> Comments: In-reply-to Keith Fiske message dated "Tue, 13 Sep 2016 17:06:16 -0400" Date: Tue, 13 Sep 2016 17:21:38 -0400 Message-ID: <17047.1473801698@sss.pgh.pa.us> X-Pg-Spam-Score: -4.2 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Keith Fiske writes: > On Tue, Sep 13, 2016 at 5:03 PM, Marko Tiikkaja wrote: >> Did you miss this part? >> /* [ ... ] Note >> * also that the result is in a static buffer, not pstrdup'd. Oh, duh. > Yeah I did see that when i went to look at its source and wondered if that > may be why, but I'm still fairly new to C and wasn't sure that was the > reason. > Still think it would be nice to use it in a more flexible manner. You can pstrdup its result if you want. If it did that internally it would result in some memory leaks we didn't want, IIRC. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs