Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hbt0j-0002fK-OG for psycopg@arkaria.postgresql.org; Fri, 14 Jun 2019 20:41:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hbt0i-0006C3-A6 for psycopg@arkaria.postgresql.org; Fri, 14 Jun 2019 20:41:20 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1hbt0h-0006Bv-V4 for psycopg@lists.postgresql.org; Fri, 14 Jun 2019 20:41:20 +0000 Received: from mail-yw1-xc34.google.com ([2607:f8b0:4864:20::c34]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hbt0d-0001kP-UL for psycopg@postgresql.org; Fri, 14 Jun 2019 20:41:19 +0000 Received: by mail-yw1-xc34.google.com with SMTP id t2so1632846ywe.10 for ; Fri, 14 Jun 2019 13:41:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=berkeley-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XEMC92OQBKYdw25bQmIFs5h/WCPWt6PiwLUDg77uzNY=; b=FuN8330RS/JHWtK4UGjYU2Gl87iZQQE2hEaE/ak3wnQ36SYOpDB8qA3ix83ohbbSF1 /PFBz0SrgrK4wS+aU9ZhiEETrBwFT0k7s3A320+NQGAQO5jYs1JF3oxPCqxX6TA2/TjP OxJgAiMXK2CIJFzy5awO8kuGr2kyFMNbOwetPqg3x1uYQsUTcsltdd7I1l8PowpV/HGH 4rKATZ8LcFsmFazUQBmVLEibny9+g91NMn7ZrvCHa0ynycdQ1JZjrrdIZQfvxKA3njrH OQOB9RumVB/aXoYRImxVPp4Y/QTBP9l3M4hMcZ3Lh/vGvqbPb0jqy4yymQw+ng2e2d+r GdyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XEMC92OQBKYdw25bQmIFs5h/WCPWt6PiwLUDg77uzNY=; b=DdfltZInr+r6FD0LgDGuwcumK9bbOo4O5l75uWXO92cRC2i76YACQFGLJsR3pHGniD S37BgXr3BGUiW+S7Flh2aZN0XndBqHMztuPhIxoRdmZC0kFBgyCUiUiqQcKAXuVDhbeR LXzcwWyihbz5JZRnYb2bNZQoO3Qg/rZkron5YE4VLR6kt77Afl4MjUDViUORGNkyfbwT L/laeMi+bz4hwXsc2b5760LfpVREgk6DgJXcvOU+VUVpmAnM122yEdBRT59yaQQlSfyP 8GjHkduk8FOWYqJ2B5QzLH2/GuI87sArzWqycTVTbmSP5Z0pFzlfPHRpFou4dN5LTh+J /StQ== X-Gm-Message-State: APjAAAWXbfNu++3//oAyPNOKJgBMgK3rlGoR5fPGf4xXkF7ZUQGMZ69/ Q0hShk1KxVCwC3A+3UC5rFS3IPSA1XmvDNFY11Dfkg== X-Google-Smtp-Source: APXvYqxMLTa28sN/wm2G+9tBn2dyo9yU9cdgE7MOnM6IMKM1sf3bU/Vd9GDfDH+TLBg7SoGhuN76evpXLNWj0k1pCZ0= X-Received: by 2002:a81:3a82:: with SMTP id h124mr47538610ywa.375.1560544873445; Fri, 14 Jun 2019 13:41:13 -0700 (PDT) MIME-Version: 1.0 References: <33071EF2-86DE-4698-BFAA-6F084024A826@thebuild.com> <575FDD0B-5C9C-42D5-BAF5-FA898E6A9B3B@enterprisedb.com> In-Reply-To: From: Daniel Cohen Date: Fri, 14 Jun 2019 13:41:02 -0700 Message-ID: Subject: Re: Creating dynamically-typed tables using psycopg2's built-in formatting To: Daniele Varrazzo Cc: Christophe Pettus , Sebastiaan Mannem , psycopg@postgresql.org Content-Type: multipart/alternative; boundary="000000000000d69932058b4eaa05" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000d69932058b4eaa05 Content-Type: text/plain; charset="UTF-8" Awesome, thanks! On Fri, Jun 14, 2019 at 12:13 PM Daniele Varrazzo < daniele.varrazzo@gmail.com> wrote: > On Fri, Jun 14, 2019 at 6:44 PM Sebastiaan Mannem < > sebastiaan.mannem@enterprisedb.com> wrote: > >> Yeah, >> "schema.tbl" will search all schemas in search path for a table >> explicitly called "schema.tbl". >> So that will never find a table called "tbl", and most probably never >> find a table at all. >> > > Also note that from psycopg 2.8 you can use Identifier("schema", "tbl") to > represent a dot-separated sequence of identifiers. > > http://initd.org/psycopg/docs/sql.html#psycopg2.sql.Identifier > > > -- Daniele > --000000000000d69932058b4eaa05 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Awesome, thanks!

On Fri, Jun 14, 2019 at 12:13 PM Daniele Varrazzo= <daniele.varrazzo@gmail.c= om> wrote:
=
On Fri, Jun 14, 2019 at 6:44 PM Sebastiaan Mannem <sebasti= aan.mannem@enterprisedb.com> wrote:
Yeah,
"= schema.tbl" will search all schemas in search path for a table explici= tly called "schema.tbl".
So that will never find a tabl= e called "tbl", and most probably never find a table at all.

Also note that from psycopg 2.8 you= can use Identifier("schema", "tbl") to represent a dot= -separated sequence of identifiers.



-- Daniele
--000000000000d69932058b4eaa05--