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 1rV7EO-00EwFI-9w for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Jan 2024 09:50:08 +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 1rV7EN-00CuNo-Bn for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Jan 2024 09:50:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rV7EN-00CuNg-29 for pgsql-hackers@lists.postgresql.org; Wed, 31 Jan 2024 09:50:07 +0000 Received: from mail-yb1-xb2f.google.com ([2607:f8b0:4864:20::b2f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rV7EK-004Ivd-9X for pgsql-hackers@postgresql.org; Wed, 31 Jan 2024 09:50:05 +0000 Received: by mail-yb1-xb2f.google.com with SMTP id 3f1490d57ef6-db3a09e96daso4402066276.3 for ; Wed, 31 Jan 2024 01:50:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706694603; x=1707299403; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=iEUxaeWm0R5mQP7oTeyDrncxlHUo3ZJASEg4M1/G86I=; b=AqI6IpX+opDJzzWJMrOvQhHsvjkd/aVERYfeopsDqlMUkYO3HZ81euNRJPZyTOfKwo vYTPvuxz0Ylnq46l3qQX+Wm9PoxSQX5Bj/i7FoNgy25CnuZ05/o+DgcL+4uzy1mNLbpv nTwyoZ0KMLKuUtgnEf6SRxmJRGWbseEn4FIdYoIkFQVsXSb+zDKxit6pSmSQgEiM3Jz0 UXco0I1nHIWlzaf//MmuNz0dYktEWhyxb+fVYOa6eMIbao3yX7d7ABPOdb1uBzgpWFRM 2b8mB9dqrrs8Xwk/38JeOmBb5lqAb6KfZHv3Dffv6ESuEpw5Z89pUY9pAO2dXUIbCz5o ePzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706694603; x=1707299403; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=iEUxaeWm0R5mQP7oTeyDrncxlHUo3ZJASEg4M1/G86I=; b=DJUjTCxmqu1ocLQVPauZlEMECyNMLW2rCeftZH/u9tpKsPOkBi7dHsCVLj77otcuwM Jlm0Urrh/TNy7Z2htD5fi9t3lr/KjYIDdRIG+5qeQX77PVzFznPj781rueJg1bN4PVKB oOl4dA5thmD7/5IivxFkW3wvjEWIVRVe0tAPAqx9hdJeQFmI1qKMJjb6HX35qGfWQk9A JddpUxi6Q5hIfwkliVcYOh2Nelhpz5VYfMb41mpYLnGP109lRIWqdKjMSeG9ZLomxzV6 SC5KXJV0EXXNUKULLbJsqnQXl4otFOPd6u/PIRvaZYe2Bkv37Aq3xBpSgg3Ppb6DAqen 0IPg== X-Gm-Message-State: AOJu0YzNqNACFNsrAny0KZtFiczV26BswmrNFnDulxSdsCq65A2ubLqh 35SkMZ2jXVsMG8wuACc1baXAb8xMVCcYiJxpDAgLPYaYYa4P5g1W5KKuVkK1TNhI0D31EBkKjL4 XA+7liFFiCdPaz6BrFgOqzOXl0m8= X-Google-Smtp-Source: AGHT+IGmj6wKQiDFe6mBiABPVq5ozq7ywffaBjE1+q3Wbg+13pF3hTXciFIYfnv2/Co6nTGpg+7YvXgkVqRzz+iW7eg= X-Received: by 2002:a05:6902:569:b0:dc6:cc18:26bd with SMTP id a9-20020a056902056900b00dc6cc1826bdmr10322ybt.38.1706694603343; Wed, 31 Jan 2024 01:50:03 -0800 (PST) MIME-Version: 1.0 References: <8620df11-96e4-4ca3-8f3c-33a479260961@joeconway.com> <4162f7f7-6fd6-4720-98e2-89f80e3de2ed@joeconway.com> In-Reply-To: From: vignesh C Date: Wed, 31 Jan 2024 15:19:51 +0530 Message-ID: Subject: Re: Emitting JSON to file using COPY TO To: Junwang Zhao Cc: jian he , Masahiko Sawada , Joe Conway , Daniel Verite , Andrew Dunstan , Davin Shearer , PostgreSQL-development , Sutou Kouhei Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, 27 Jan 2024 at 11:25, Junwang Zhao wrote: > > Hi hackers, > > Kou-san(CCed) has been working on *Make COPY format extendable[1]*, so > I think making *copy to json* based on that work might be the right direction. > > I write an extension for that purpose, and here is the patch set together > with Kou-san's *extendable copy format* implementation: > > 0001-0009 is the implementation of extendable copy format > 00010 is the pg_copy_json extension > > I also created a PR[2] if anybody likes the github review style. > > The *extendable copy format* feature is still being developed, I post this > email in case the patch set in this thread is committed without knowing > the *extendable copy format* feature. > > I'd like to hear your opinions. CFBot shows that one of the test is failing as in [1]: [05:46:41.678] /bin/sh: 1: cannot open /tmp/cirrus-ci-build/contrib/pg_copy_json/sql/test_copy_format.sql: No such file [05:46:41.678] diff: /tmp/cirrus-ci-build/contrib/pg_copy_json/expected/test_copy_format.out: No such file or directory [05:46:41.678] diff: /tmp/cirrus-ci-build/contrib/pg_copy_json/results/test_copy_format.out: No such file or directory [05:46:41.678] # diff command failed with status 512: diff "/tmp/cirrus-ci-build/contrib/pg_copy_json/expected/test_copy_format.out" "/tmp/cirrus-ci-build/contrib/pg_copy_json/results/test_copy_format.out" > "/tmp/cirrus-ci-build/contrib/pg_copy_json/results/test_copy_format.out.diff" [05:46:41.678] Bail out!make[2]: *** [../../src/makefiles/pgxs.mk:454: check] Error 2 [05:46:41.679] make[1]: *** [Makefile:96: check-pg_copy_json-recurse] Error 2 [05:46:41.679] make: *** [GNUmakefile:71: check-world-contrib-recurse] Error 2 Please post an updated version for the same. [1] - https://cirrus-ci.com/task/5322439115145216 Regards, Vignesh