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 1kYXe4-00007W-1p for pgsql-admin@arkaria.postgresql.org; Fri, 30 Oct 2020 16:52:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kYXe3-0001gm-0p for pgsql-admin@arkaria.postgresql.org; Fri, 30 Oct 2020 16:52:55 +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 1kYXe2-0001ge-MH for pgsql-admin@lists.postgresql.org; Fri, 30 Oct 2020 16:52:54 +0000 Received: from mail-qt1-x82a.google.com ([2607:f8b0:4864:20::82a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kYXe0-0003c6-E4 for pgsql-admin@postgresql.org; Fri, 30 Oct 2020 16:52:53 +0000 Received: by mail-qt1-x82a.google.com with SMTP id f6so3633191qtc.7 for ; Fri, 30 Oct 2020 09:52:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=content-transfer-encoding:from:mime-version:date:subject:message-id :to; bh=4LCJvSSZKd85c3wNUz+15TarzwCMaNS/7/lLYsf9Juw=; b=DG65DaQkH9IB0vaCZ0JKtUmKH+bHyznWFBNPLOI7jvWO0yYNinDTC35byPYQgO3I1t 6vZOwGvf3eI3/XYzmRO0DI2D9OjzaAvl5OEtoRtw1IdvuECcll26Due1dRTKB/OfAS8h at7ygE4w2bv94lZ0YU5p3/ypdzvmOjbek3Ub+kLEhguJSHqvVI06VNNpQi1OV5QS18a8 u9Rj5B+2/TlW2LOFmuGUtz3g6mBOg+FGBKmccx63yKCMCC09N5SmKzxFo+WDoPxWTRLh 3UO4jzjOojnDj9FyICK/RGkdLXvw5jyG8qlG/rcm2vsMtr3crsQ5JAJXVq1QzIe4rI3C pYbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version:date :subject:message-id:to; bh=4LCJvSSZKd85c3wNUz+15TarzwCMaNS/7/lLYsf9Juw=; b=ioqDnErOvSCZSSt/SAlyojNPyrLmfeOdZlWWJBNMXvD46U7kSjO67OowPA6cRrfzhF MeQf2fg9niTuk6gZZ24jYoNnZnSMmb35kICmQyo8/Jq5QT7e0NgwJAdvxHl9nJpxpCmS boMFPWdLDlvF6u0Z4VdgvM7BPK3+7sJXj76Ns4zFqSClPLz53nYxDFLFCn/VoIp/5i56 ot2Glyffhid/vAOf/B5GQhMlNni1pHfbaS1+6xswkCIeUOQK4jB/GN/1rRTchMneon93 akaKNMIA0Nohq9Cdfs2TCtDiFOFpzqXdoqf8jPHoDSaujJDSgWICuLzzUGRfFPRn20dI cj2Q== X-Gm-Message-State: AOAM530VXN0UZZ4AJiC8mCbKHwsMNHyPK90s0HMkXI5tjHIHT8XbYBsI Um8pAKCfyGz1cGmZn6pyijtxKwYmCG9dRA== X-Google-Smtp-Source: ABdhPJz61jCOg6FaUxBeNOt3sOKmuqRSSBQKRQinKMCN36tsLJ3TijhCGAYzWou1A0ggrE7a6L1/5Q== X-Received: by 2002:ac8:d6:: with SMTP id d22mr2950791qtg.30.1604076770978; Fri, 30 Oct 2020 09:52:50 -0700 (PDT) Received: from [192.168.1.35] (cpe-71-72-37-104.neo.res.rr.com. [71.72.37.104]) by smtp.gmail.com with ESMTPSA id j17sm806715qke.49.2020.10.30.09.52.50 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Oct 2020 09:52:50 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: John Scalia Mime-Version: 1.0 (1.0) Date: Fri, 30 Oct 2020 12:52:49 -0400 Subject: Creating a partition table Message-Id: To: pgsql-admin X-Mailer: iPad Mail (18A8395) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi all, I have a PostgreSQL server version 11.3 that my devs are asking for some par= titioned tables. I can=E2=80=99t seem to get the syntax correct though. My S= QL code is: CREATE TABLE schema.temp_table AS (SELECT * FROM schema.original_table) PARTITION BY LIST(attribute_name); As what I want to do is create a copy of the current table, create the parti= tions on the new temp table, and when everything works, drop the original ta= ble and do an alter table rename on the new one. The error is: ERROR: syntax error at or near =E2=80=9CPARTITION=E2=80=9D Line 3: PARTITION BY LIST(attribute_name); I=E2=80=99ve tried using the word RANGE as opposed to LIST, but the error re= mains. Does PostgreSQL not support a construct like this one or am I doing s= omething wrong? =E2=80=94 Jay Sent from my iPad=