Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rBdIS-00BeJs-6f for pgsql-general@arkaria.postgresql.org; Fri, 08 Dec 2023 16:01:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rBdIQ-009Ir5-SP for pgsql-general@arkaria.postgresql.org; Fri, 08 Dec 2023 16:01:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rBdIP-009Iqx-UP for pgsql-general@lists.postgresql.org; Fri, 08 Dec 2023 16:01:46 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rBdIM-00AqN5-7J for pgsql-general@lists.postgresql.org; Fri, 08 Dec 2023 16:01:45 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 383325C0042; Fri, 8 Dec 2023 11:01:39 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 08 Dec 2023 11:01:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1702051299; x=1702137699; bh=GgO0wbogUUq86BzZcoNIkzMiE2MccST9BLz 9tSfZJgs=; b=niOPQh9L5hHTZC+BZzK4uTMvQHEZ8TWYJSsJoFKkBwWfRS+0RWn AqLP+YiX5q1odq1aYL5w5gQZ7IorIBd6buaTOK9K8VGmi6HxXYCfKaq+nTO5KxYN P5vQKCQvmATSZ+9aX57Wwfz/Xcfp/ZE4MDyfVaVAap/6PaJY0KTQ9yim/74gOhkV 0g04VDUzJ1vvIIyyhgAgaaEU2imUBmCxklWSgADmiX1U0EJS7T0xB/+WZhNg/Ru1 hvUirhMxVER/7U6y1EPUSnEt52FDVg/8N3r1y8Y38E1IrEEWQsA/QDMk7fCRdS2W k63oRNkK/TiKcDM11HgRU2uFv/r13H3PUxg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1702051299; x= 1702137699; bh=GgO0wbogUUq86BzZcoNIkzMiE2MccST9BLz9tSfZJgs=; b=F JF1HoIIKBVXzjJAMoJL+Pp2oIsuRU9z3jgm9vKuO2G1JNhUgchw46CFiwxYqo4Wf Un7ow7AZP97Qwu1hrr1OgHr4OsTmH4CqgxcU7rYFp3zGgB6joloS7zGunsvylLE/ +AOQNZ6ngbvcnm+j+ro5jdpsDj9vvRap+OrbAdR9cKBbX+1R/zUAJUoYzY+MNxUd 26IdkhC71OH19iGkLeDnzauAkiJrekTXYfU2PtXOwgEboOptb/XdvlOI8d/NtCpf Bl1Ir0fJa5N3x6bxNm01sXwkgj3d324VmX0OljnlL8LuUqJmizLi227u9st38MlA +N+gN2kCUpCvWrBLpigWA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudekiedgkeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtke ertddtvdejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepfeehieefvd fhffekvdffgfdvueehledvffdvgfefveehveegffelhfdtfedtiefgnecuffhomhgrihhn pehmvghtrggtphgrnhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 8 Dec 2023 11:01:38 -0500 (EST) Message-ID: Date: Fri, 8 Dec 2023 08:01:37 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: running \copy through perl dbi ? To: David Gauthier , pgsql-general@lists.postgresql.org References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 12/8/23 07:45, David Gauthier wrote: > Hi: > > I'm trying to run a PG client side "\copy" command from a perl script. > I tried using $dbh->do("\\copy ...") but it barffed when it saw the '\'... > ERROR:  syntax error at or near "\" > > I can do this with a command line approach, attaching to the DB  then > run using... > -c "\copy ...".  But I was wondering if there is a more elegant way to > do this, maybe some sort of legal SQL command that Perl/DBI would > swallow ??? Per David Johnston post: https://metacpan.org/pod/DBD::Pg#COPY-support > > Thanks in Advance ! > -- Adrian Klaver adrian.klaver@aklaver.com