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 1mJk3T-0001FU-T0 for pgsql-general@arkaria.postgresql.org; Fri, 27 Aug 2021 22:10:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mJk3R-00050X-Lf for pgsql-general@arkaria.postgresql.org; Fri, 27 Aug 2021 22:10:29 +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 1mJk3R-00050P-Cf for pgsql-general@lists.postgresql.org; Fri, 27 Aug 2021 22:10:29 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mJk3L-0004Z0-08 for pgsql-general@lists.postgresql.org; Fri, 27 Aug 2021 22:10:28 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id F3B835C0098; Fri, 27 Aug 2021 18:10:21 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 27 Aug 2021 18:10:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=m +gNr9dXx951NiHXp0wkgiM8RDosdwn1INKzEAc5XGI=; b=pdo7BM/n8y+8jE7ZB TuDPCmFiiAylHPahRMhrm6CP2hpaYtetYwl4JEOE+oA8/7ONYrmihfWL9lqBo8qu PGJp2yXz7WUz+QZ1pLHFusk52h8oBSMtfaoT1g7st31RSMSY55sXEKfP22fO/dN5 iIZg/kzx18pnMfM6s3Ml5ax1EOH9l21MZw7CB6z2oXJmyGWtfEMxk8MgQzXtW8pt 5C7zB+ZCBkbNenUmfpoMpPMEUlVBtzpjcHOaE9ymlLXV3vgFZOOMPWH9CwWCufLb HfQMVEeI7UdosdNhyuVBTxWniK9TwGk5HM8x+J7kLg/6fqsI8OObWxTxoT8rYHln M7PjA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=m+gNr9dXx951NiHXp0wkgiM8RDosdwn1INKzEAc5X GI=; b=GhpI2Q6GQovSlDeCDUy5TcMgJWbcW7LrE3vY4Y8jszqrnEHuQ+U9d8efp Hzb6rvHaCIbwhKymNH76brD1v0cZrHILL1VM7zFHSV7iF+Wal2VIrmqI03J0Nkap jA4vl6p18Tkuo3oJXWx3gHL8uoZ81ugUmouSD9pFSiZj71IyUKMO2kPzW9VauHxm NKoNexkba11B6K6gTboZwOYMFfNNtYBDmy8v+6l2vfv1O2/tHnmqMDeWtBg1Ak2z 8kkarzdh2k0flMFghmAxxZlGWV2DTO2qZ5myrhsBkVJd2ooI9JSplt2fJvCDpy30 MnUsgCwepysevuM6IZgF9rZP9CGsQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddugedgtdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtje ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepuddvkeetve eujeegveeuuefhffduvdfhheeggfduvdfggeekieelvdfgudelfedtnecuffhomhgrihhn pehphhhprdhnvghtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Aug 2021 18:10:20 -0400 (EDT) Subject: Re: use fopen unknown resource To: ourdiaspora , "pgsql-general@lists.postgresql.org" References: From: Adrian Klaver Message-ID: Date: Fri, 27 Aug 2021 15:10:19 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 8/27/21 2:59 PM, ourdiaspora wrote: > Readers, > > Objective, to import a csv file into postgresql database. If understood correctly, the manual section 'fopen' (https://www.php.net/manual/en/function.fopen.php) shows that the file has a "known resource" extant name. > > Please what is the syntax to assign an unknown file name to the 'fopen' function? > Why not use?: https://www.php.net/manual/en/pdo.pgsqlcopyfromfile.php -- Adrian Klaver adrian.klaver@aklaver.com