Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1daPMN-0001p4-3P for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Jul 2017 16:40:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1daPMM-00080d-8q for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Jul 2017 16:40:30 +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 1daPMK-0007uI-Mj for pgsql-hackers@postgresql.org; Wed, 26 Jul 2017 16:40:28 +0000 Received: from mail-qt0-x22a.google.com ([2607:f8b0:400d:c0d::22a]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1daPMH-0001b8-5O for pgsql-hackers@postgresql.org; Wed, 26 Jul 2017 16:40:28 +0000 Received: by mail-qt0-x22a.google.com with SMTP id a18so31063295qta.0 for ; Wed, 26 Jul 2017 09:40:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=hOnhZfbGeTcm1GAD3MmCcNCiPPH/Hgu0Cv19U6fLNak=; b=UMHNfjiNh7aICvrpAuFgdtFM8NZJ8EZvebcVXW9vxFI6zetNweIib7d7TGveb2fnB0 iNUfCgxJmMNNnCOBEeuj78/6aLMY/W6hacQSCpyGWcO9Pd4leAaHYlDKfR4Bua8SElSd EASjOjyZ72wI1LPZR1l4q7NkmKSVa31nLakhdEJNvB/liSoZbqbnKghwI3HJhqe3vgKJ p0aL1mBFmlNvoi96Mon6vllPlxIlZywV1nixlNRu2yta2mSMtFUFysoXr9xz1MJhuVgl Y2S7ViOrfw+MZXU4AoH5+KXGlehzKTxwL8tJkpJGvfOGRqBRbn3FMHPrnljmrBIFleRy b1dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=hOnhZfbGeTcm1GAD3MmCcNCiPPH/Hgu0Cv19U6fLNak=; b=gsUaDfD2LowAai3WBwRkRdoRfPtfzGMs6waphFSZXpbmLQ1tz5ME+tY7/GLcLrHPwd 54imtepS+eyvxJwBLrLKihBL0lQEioP6IATkHspTyD1Inuo1UoLDcrHpYDgZex72HVY3 2Y/yXmDnD7/h/T0uEGzxIxx5BjGTiYWZTOpD4KwLwCDTUiozMHKD4J2kJ2DeCkYARHhk P+L76CP5aLCG2A+Is6PNwnWZmp9Y5bsrZvRtfYuHX97H3uGe+cfib7U8t2+Y1GsA5Ixs V5mTihn5WB1WtKc3C6DkrpGUyfvXNVHdHYhbLrpwmMz2WkMIZmQcSPRc+3zwlWP+K6ec QcWA== X-Gm-Message-State: AIVw1121jybEOz/Sa2XLV9JD3gjZqvjbqiF07S0sxK0oGwG84D7yTNVW FZp7Hmr0vODrO+09 X-Received: by 10.237.46.99 with SMTP id j90mr2354110qtd.156.1501087223723; Wed, 26 Jul 2017 09:40:23 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([179.57.115.10]) by smtp.gmail.com with ESMTPSA id f32sm13127410qkf.4.2017.07.26.09.40.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Jul 2017 09:40:22 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id DFF3D5EF; Wed, 26 Jul 2017 12:40:20 -0400 (-04) Date: Wed, 26 Jul 2017 12:40:20 -0400 From: Alvaro Herrera To: Kunshchikov Vladimir Cc: "pgsql-hackers@postgresql.org" Subject: Re: [patch] pg_dump/pg_restore zerror() and strerror() mishap Message-ID: <20170726164020.zavdyr4en3eheqrr@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1501082204231.82652@infotecs.ru> User-Agent: NeoMutt/20170306-137-4415bd-dirty (1.8.0) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Kunshchikov Vladimir wrote: > Hello Alvaro, thanks for the feedback, fixed all of your points. > Attached new version of patch. Looks great -- it's a lot smaller than the original even. One final touch -- see cfread(), where we have an #ifdef where we test for fp->compressedfp; the "#else" branch uses the same code as the !fp->compressedfp. I think your get_cfp_error can be written more simply using that form. (Also, your version probably errors or warns about "code before declaration" in that routine, which is not allowed in C89.) -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers