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 1ekYoK-0000I9-Si for pgsql-general@arkaria.postgresql.org; Sat, 10 Feb 2018 17:19:37 +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 1ekYoJ-0002AW-MT for pgsql-general@arkaria.postgresql.org; Sat, 10 Feb 2018 17:19:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ekYoJ-0002AM-AA for pgsql-general@lists.postgresql.org; Sat, 10 Feb 2018 17:19:35 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ekYoC-0000mS-D9 for pgsql-general@postgresql.org; Sat, 10 Feb 2018 17:19:34 +0000 Received: by mail-wm0-x243.google.com with SMTP id i186so2755654wmi.4 for ; Sat, 10 Feb 2018 09:19:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=qNyg+4y+lguZn1ha1vpSI29bWE8Sv4nbrATCd34HO98=; b=QekrWOBo/NhowLH137Xwk1ztbT3hLQcybNOx9gKxqGhFpXzmugZFv9aLcL9Xy2mKaP P+lgonXu7Te8lj8jJTahqOlRauliM2WU5cXPmkwJiPehxGKxFpsm26Z9Lrrekugu8f2F sQqhfXLAI9iE/baJlXIetyz8NUtpu30/DrHYYmvufU1RCovKBb3gQ32wL0RZbWNvOHZX NpSq2TfwH70H72Njo9ziNcrSaFuqYZzcixgIcvxl20/Pd0dZ2sSKcYEffhKM7b30dtbf 3SMZMT6LK28rBKUwT3CE/STTa+zSnfHLSONEdmEUCGgCClVd2pk1OA32C3Zqyu+TJ0Vi qr/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=qNyg+4y+lguZn1ha1vpSI29bWE8Sv4nbrATCd34HO98=; b=DDeg6k78pOZM+I8Z7cY15lYxXIdzd12fUS6Y9KCk9YeVc9YRo6kiLHaVR66T+aTm08 1Oy3XnS+LAokiBfThalK7ZJ0Jc+4knRGKsCEqrnwXtGI8CCMUGrPLoiPMX8Gv9nPb3BD xw1lBfk5f0s9UkxyocMdfvtdxQMjHXvc9VBIArZiLUxxg9JO1q/5qBBkkliRpaRsXfYI YDGjkPQo2vzfsABaSMA579bX5CQ09nPsHiyvhjqZWnQUMbRIL7OFIcZoJf1kZI+InHAX wLvFGGRG7bZ6ntmsYHFF80Zs9aVSOm1n52Ncud5MkWrPmcnVuXaBlvXHlUClwU3S6Mq8 fapQ== X-Gm-Message-State: APf1xPA3wI+w5lwFvU7QueMLM0iK1Mn5CzXkf9+k0jsVY+zdlwScMy2v XikMxbeXLHFS1TKw9fvh088CilO3IrCQW7O42di8XcJMSkXvcc1rRiFehVwWq1mbsnVO6SSDGnX BmNpFj68uqilHHu9KAUQut00VOGu4dK4w2OnTDOBH65u0sv6HANSVpH0sPVLWTNDXoRTU9IxJCo qBkPhZLBE5 X-Google-Smtp-Source: AH8x224IK0F5poeF3G8Ramqh5aEgUYxgx/UYo5G8dzlzvonqmSzwo4MIGFm0E9f++ITTewRcuXe83w== X-Received: by 10.28.65.133 with SMTP id o127mr4664433wma.130.1518283166769; Sat, 10 Feb 2018 09:19:26 -0800 (PST) Received: from [10.137.2.19] (ip-78-102-97-226.net.upcbroadband.cz. [78.102.97.226]) by smtp.gmail.com with ESMTPSA id f9sm1430157wmf.12.2018.02.10.09.19.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Feb 2018 09:19:26 -0800 (PST) Subject: Re: New Copy Formats - avro/orc/parquet To: "David G. Johnston" , Nicolas Paris Cc: "pgsql-general@postgresql.org" References: <20180210151304.fonjztsynewldfba@gmail.com> From: Tomas Vondra Message-ID: Date: Sat, 10 Feb 2018 18:19:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 02/10/2018 04:38 PM, David G. Johnston wrote: > On Saturday, February 10, 2018, Nicolas Paris > wrote: > > Hello > > 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. > >   > It would be written "... with (format 'orc')" and your best bet would be > to create an extension.  I don't think that having such code in core (or > contrib) is desirable. > I don't think make this extensible by an extension (i.e. the formats supported by COPY are hard-coded in core). But I agree that if we are to add multiple new formats, it'd be nice to allow doing that in extension. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services