Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kDvXN-0007d9-EA for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Sep 2020 20:08:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kDvXM-0001RC-CD for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Sep 2020 20:08:48 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kDvXM-0001R5-12 for pgsql-hackers@lists.postgresql.org; Thu, 03 Sep 2020 20:08:48 +0000 Received: from mail-qt1-x82f.google.com ([2607:f8b0:4864:20::82f]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kDvXJ-00034R-GH for pgsql-hackers@postgresql.org; Thu, 03 Sep 2020 20:08:47 +0000 Received: by mail-qt1-x82f.google.com with SMTP id 19so1452411qtp.1 for ; Thu, 03 Sep 2020 13:08:45 -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=xu26obdlm/AmN3ojBSrRzPhDFu6/z+vtmAH0O0aKPzc=; b=wW6M927Fdcl5lxXZ5ujYEIsMcYhkr0c/KnZUEMXHV/cni5Fhvmpqgf3fDzjLnUdRj0 TLlvnQCVT66/nzNf2zEq6fNg2gmVlLOg+nkId3WvONgvCgKjEKsFBuK0sfNzYtmMu+Ce NyO2GSB1wB4wb8Fi4KBOc1IU4Pj96dMRwhal6TSAbFJC6hwmksm6BBAlU+JtU53FDjxP QNz4M6Y9AT4Tj6C5kQlPsACgf3EidiEtK86iF9UK60Yy+QnLsELIL15Uq9msWrn246+g sC47aS2O018RJq1bms2NgnalpcJLGILgoZcd4d1eitMscqLuLIPObbaMI7XqO9iattcX RzQg== 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=xu26obdlm/AmN3ojBSrRzPhDFu6/z+vtmAH0O0aKPzc=; b=D2ulvLLuHaaY74gBbDZCay6mOlgIFnjmyIdKBJk/6VnBJ3r0YEfla4ffjhubdQF2ea nvxS55xOZMCM4uqhLi0TJ1K/fZNWOz4sfM2VYl5pMll/EOWMYUYLVBDksXMRkhsiGohJ eHtXInoqhYFUjc/4LmVDRqIjRpxRO3pkGJKsQS0pRukSJxUA7Cfw27bDFooCo1qNyQx4 VNkryhwb8yezIICsuIaNqtW4BYsQWvynLm10eDoyvv14iow4ReqwCs7s2ONXvyJKAjYa popbRJKiyudu2qzMnF2YZ2ScY6E/8wM2ZJTkKPQ/vxYDKYrEqG3VyNYrk594w/MP8b0P yAxw== X-Gm-Message-State: AOAM530t+MciyCkqThI3SmJXPBAjQpoQmBJUuFl0fkjYNLG+0a43tOU2 Kkw0ZN+O+17uu/WQ878J9gKcUQ== X-Google-Smtp-Source: ABdhPJwFAHODFiRyiKfupx4VMbLGz2l/oodv5JEABAwpWD/xjl9SN57lK6W3c4LEUlxU4wbLw77VKg== X-Received: by 2002:ac8:3597:: with SMTP id k23mr5260371qtb.238.1599163724611; Thu, 03 Sep 2020 13:08:44 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.19.47]) by smtp.gmail.com with ESMTPSA id r195sm2745066qke.74.2020.09.03.13.08.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 13:08:44 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 1554D2A0FB5; Thu, 3 Sep 2020 16:08:42 -0400 (-04) Date: Thu, 3 Sep 2020 16:08:42 -0400 From: Alvaro Herrera To: Pavel Stehule Cc: vignesh C , Justin Pryzby , PostgreSQL Hackers Subject: Re: proposal: possibility to read dumped table's name from file Message-ID: <20200903200842.GA11952@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Jul-27, Pavel Stehule wrote: > +/* > + * getline is originally GNU function, and should not be everywhere still. > + * Use own reduced implementation. > + */ > +static size_t > +pg_getline(char **lineptr, size_t *n, FILE *fp) > +{ So, Tom added a coding pattern for doing this in commit 8f8154a503c7, which is ostensibly also to be used in pg_regress [1] -- maybe it'd be useful to have this in src/common? [1] https://postgr.es/m/m_1NfbowTqSJnrC6rq1a9cQK7E-CHQE7B6Kz9w6fNH-OiV-4mcsdMw7UP2oA2_6dZmXvAMjbSPZjW9U7FD2R52D3d9DtaJxcBprsqJqZNBc=@protonmail.com -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services