Re: Creating dynamically-typed tables using psycopg2's built-in formatting

From: Daniel Cohen <daniel(dot)m(dot)cohen(at)berkeley(dot)edu>
To: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
Cc: Christophe Pettus <xof(at)thebuild(dot)com>, Sebastiaan Mannem <sebastiaan(dot)mannem(at)enterprisedb(dot)com>, psycopg(at)postgresql(dot)org
Subject: Re: Creating dynamically-typed tables using psycopg2's built-in formatting
Date: 2019-06-14 20:41:02
Message-ID: CAHAzoY=gFqbUNVP0zunM3g++yOSOTRJ01Zo_B9k+9g702iLOLA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

Awesome, thanks!

On Fri, Jun 14, 2019 at 12:13 PM Daniele Varrazzo <
daniele(dot)varrazzo(at)gmail(dot)com> wrote:

> On Fri, Jun 14, 2019 at 6:44 PM Sebastiaan Mannem <
> sebastiaan(dot)mannem(at)enterprisedb(dot)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
>

In response to

Browse psycopg by date

  From Date Subject
Next Message Aryeh Leib Taurog 2019-07-11 21:14:28 pgcopy 1.4.0 release announcement
Previous Message Daniele Varrazzo 2019-06-14 19:12:54 Re: Creating dynamically-typed tables using psycopg2's built-in formatting