Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ekX6Y-0002ch-Vd for pgsql-general@arkaria.postgresql.org; Sat, 10 Feb 2018 15:30:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekX6X-0005pf-Me for pgsql-general@arkaria.postgresql.org; Sat, 10 Feb 2018 15:30:17 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ekX6X-0005p5-Ar for pgsql-general@lists.postgresql.org; Sat, 10 Feb 2018 15:30:17 +0000 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ekX6U-0005tJ-CL for pgsql-general@postgresql.org; Sat, 10 Feb 2018 15:30:15 +0000 Received: by mail-wr0-x242.google.com with SMTP id t94so11028750wrc.5 for ; Sat, 10 Feb 2018 07:30:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:priority:user-agent; bh=x/O1oGLfZ37N6aFc+oSv8YOz/waiv0tM3CXNwDUXMcU=; b=HG142PnUMcN8DLf6MQH8hmzpNtg7L7niJhUg17l8dQAVATDVD+NqC9TP7roluq7UHD T/4QqO4QdrgQC1HjZ5+O9lWFZvHjC2IsSHPZrTLp+MnLIe1f4mwKVK4VJX8N/0Wowg/o 7LVWX9D3Y7dAKqg9GaOnjHZNMBK0Qp4FPt9GeaLqhOySqL4KXk7al86scj5hUF3TbqDj IylfSpN6bEcOjxXZc8g+9Gvv2vQ4wnbOE1AaANEx33LgDC+LNg7KMTaxF5JgCr25TzpW 8WPZ/qnRBFflc0QEKG3sCL/LxVSe99SLIbZmyvXh0Xf4WpX5SRxtsg8NgW/PIyiMPVp6 bxzA== 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:references :mime-version:content-disposition:in-reply-to:priority:user-agent; bh=x/O1oGLfZ37N6aFc+oSv8YOz/waiv0tM3CXNwDUXMcU=; b=Yp45lfmW0DI0VxgCm4h90SUVTWsID91st1uPPIksTsj4+LtY7982MuqmbsVwLpjXt2 BW54Y1CLrlS+HcKnfndqosMU41ctNOI7WlrkL95VLOCZaRZv71RIM4bogq1ZgWDq/dXr qiZaxaQ9KpgRzCf0NbNiB/uibLAGEwg6Jt6ijZvwECA3TAYDBYFtnHa8DRhlBLEO0BZX 4mveBu92UtKqP0HiM+kFz5f+sbeR7GiRzSor1gHA08U5ojKu8AuA9y888h7z2U1WvmeM wEA5cetMNlIH8MDRAoeObbyjld41rWwvrGggXbnW7QvCdFalb83BgMVbBUgoGL+aonhi FV0A== X-Gm-Message-State: APf1xPCTnvgmZdT9c4/LRrr+20LWIR3og3bsNr/JXLQW39h50lkw3g4Q ygWXHSfTNdkpXCirPHHC7TJzlw== X-Google-Smtp-Source: AH8x227I6O/cBzHEiR1QL5lNCeUsb3xf5ab2LBccnYNf6pIRTkTcNoEEIx3R8l2lVfWfkk2ZHJjxTg== X-Received: by 10.223.159.77 with SMTP id f13mr1410919wrg.196.1518276612667; Sat, 10 Feb 2018 07:30:12 -0800 (PST) Received: from localhost (81-66-114-185.rev.numericable.fr. [81.66.114.185]) by smtp.gmail.com with ESMTPSA id g127sm1547259wmf.5.2018.02.10.07.30.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Feb 2018 07:30:11 -0800 (PST) Date: Sat, 10 Feb 2018 16:30:11 +0100 From: Nicolas Paris To: Adrian Klaver Cc: pgsql-general@postgresql.org Subject: Re: New Copy Formats - avro/orc/parquet Message-ID: <20180210153011.o2w3tdriqmwvahph@gmail.com> References: <20180210151304.fonjztsynewldfba@gmail.com> <78a8f0bd-4b6f-b791-b6ce-80b19e2b6d1b@aklaver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <78a8f0bd-4b6f-b791-b6ce-80b19e2b6d1b@aklaver.com> Priority: normal User-Agent: NeoMutt/20170714-155-820ab5 (1.8.3) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > > I d'found useful to be able to import/export from postgres to those modern data > > formats: > > - avro (c writer=https://avro.apache.org/docs/1.8.2/api/c/index.html) > > - parquet (c++ writer=https://github.com/apache/parquet-cpp) > > - orc (all writers=https://github.com/apache/orc) > > > > Something like : > > COPY table TO STDOUT ORC; > > > > Would be lovely. > > > > This would greatly enhance how postgres integrates in big-data ecosystem. > > > > Any thought ? > > https://www.postgresql.org/docs/10/static/sql-copy.html > > "PROGRAM > > A command to execute. In COPY FROM, the input is read from standard > output of the command, and in COPY TO, the output is written to the standard > input of the command. > > Note that the command is invoked by the shell, so if you need to pass > any arguments to shell command that come from an untrusted source, you must > be careful to strip or escape any special characters that might have a > special meaning for the shell. For security reasons, it is best to use a > fixed command string, or at least avoid passing any user input in it. > " > PROGRAM would involve overhead of transforming data from CSV or BINARY to AVRO for example. Here, I am talking about native format exports/imports for performance considerations.