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

2019-06-14 Thread Daniel Cohen
Awesome, thanks! On Fri, Jun 14, 2019 at 12:13 PM Daniele Varrazzo < daniele.varra...@gmail.com> wrote: > On Fri, Jun 14, 2019 at 6:44 PM Sebastiaan Mannem < > sebastiaan.man...@enterprisedb.com> wrote: > >> Yeah, >> "schema.tbl" will search all schemas in search path for a table >> explicitly ca

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

2019-06-14 Thread Daniele Varrazzo
On Fri, Jun 14, 2019 at 6:44 PM Sebastiaan Mannem < sebastiaan.man...@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.

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

2019-06-14 Thread Sebastiaan Mannem
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. And without quotes, it will search for a table called "tbl" in a schema called "schema". So your issue

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

2019-06-14 Thread Daniel Cohen
Hi again, I realize the error was that I specified the name as "schema.tbl", and I think because there was a period in the name, it converted to double-quote. I tried again as just "tbl" and it worked perfectly. Thanks so much for all your help. Best, Danny On Fri, Jun 14, 2019 at 9:12 AM Chris

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

2019-06-14 Thread Christophe Pettus
> On Jun 13, 2019, at 13:54, Daniel Cohen wrote: > > Thanks so much for your response. The uppercase --> lowercase fix worked for > the types, but I'm still only getting tables that can be searched by > double-quotations (i.e. > SELECT * FROM tbl; returns nothing, but > SELECT * > FROM "tbl

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

2019-06-14 Thread Adrian Klaver
On 6/13/19 12:28 PM, Daniel Cohen wrote: Hi! I'm working on a project in Python that interacts with a PostgreSQL data warehouse, and I'm using the psycopg2 API. I am looking to create dynamically-typed tables. For example, I would like to be able to execute the following code: |frompsycopg2

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

2019-06-14 Thread Federico Di Gregorio
On 6/13/19 10:54 PM, Daniel Cohen wrote: Thanks so much for your response. The uppercase --> lowercase fix worked for the types, but I'm still only getting tables that can be searched by double-quotations (i.e. > SELECT * FROM tbl; returns nothing, but > SELECT * FROM "tbl"; returns the table I