Re: Using composite types in psycopg3

2020-11-10 Thread Daniele Varrazzo
On Wed, 11 Nov 2020 at 00:36, Vladimir Ryabtsev wrote: > > Awesome, thanks. > > It would be great if it worked out of the box, as in other drivers. I do agree. I have much more experience with the text format, and in my understanding not all the types support binary I/O. But my understanding cou

Re: Using composite types in psycopg3

2020-11-10 Thread Vladimir Ryabtsev
Awesome, thanks. It would be great if it worked out of the box, as in other drivers. Appreciate your efforts. Vladimir On Tue, 10 Nov 2020 at 16:24, Daniele Varrazzo wrote: > On Tue, 10 Nov 2020 at 21:59, Vladimir Ryabtsev > wrote: > > > psycopg2 returns the 'result' as a basic string, while

Re: Using composite types in psycopg3

2020-11-10 Thread Daniele Varrazzo
On Tue, 10 Nov 2020 at 21:59, Vladimir Ryabtsev wrote: > psycopg2 returns the 'result' as a basic string, while > in asyncpg and py-postgresql I have structured data > (roughly 'List[Tuple[int, List[str]]]'). > > I tried the same in psycopg3 and it is little bit better, but > not entirely: it sho

Using composite types in psycopg3

2020-11-10 Thread Vladimir Ryabtsev
Hello, I have tried psycopg3 very briefly and I have a question. I have a couple of use cases in systems I currently work with that prevented (or seriously limited) usage of psycopg2, so I had to use other drivers. This generally relates to accessing composite types that you can construct on-the-

Re: psycopg3 and adaptation choices

2020-11-10 Thread Rory Campbell-Lange
On 10/11/20, Daniele Varrazzo (daniele.varra...@gmail.com) wrote: > On Tue, 10 Nov 2020 at 03:22, Christophe Pettus wrote: > > > > > On Nov 9, 2020, at 19:20, Daniele Varrazzo > > > wrote: > > > > > >Choices to cast Python ``int`` type: > > > > Is it absurd to make the choice at execution ti

Aw: Re: psycopg3 and adaptation choices

2020-11-10 Thread Karsten Hilbert
> My particular question is regarding '-2' score for mapping numbers > to 'unknown'. >   > Why do you consider it such an important use-case? In my opinion, > such usage is just waste of resources and traffic, I am sometimes round-tripping magic constants to tell which part of a, say, UNION actual

Re: psycopg3 and adaptation choices

2020-11-10 Thread Vladimir Ryabtsev
> I've added comparison tables with the choices available. Nice article! I see you have assigned weights to the upsides and downsides and now these weights are going to determine the winner. My particular question is regarding '-2' score for mapping numbers to 'unknown'. Why do you consider it s

Re: psycopg is the new psycopg3?

2020-11-10 Thread Vladimir Ryabtsev
As long as psycopg2 is not disappearing anywhere, psycopg3 seems better. New users will interpret psycopg2 as "more advanced psycopg". Vladimir On Tue, 10 Nov 2020 at 10:06, Adrian Klaver wrote: > On 11/10/20 9:12 AM, Daniele Varrazzo wrote: > > Hello, > > > > I have received some concerned voi

Re: psycopg is the new psycopg3?

2020-11-10 Thread Adrian Klaver
On 11/10/20 9:12 AM, Daniele Varrazzo wrote: Hello, I have received some concerned voices in regard to have a package called "psycopg3". I guess many have been burned out by the Python 2 to 3 transition, and now it's not a happy pair of number to see next to each other. Sorry, Fibonacci...

Re: psycopg is the new psycopg3?

2020-11-10 Thread Magnus Hagander
On Tue, Nov 10, 2020 at 6:12 PM Daniele Varrazzo wrote: > > Hello, > > I have received some concerned voices in regard to have a package called > "psycopg3". I guess many have been burned out by the Python 2 to 3 > transition, and now it's not a happy pair of number to see next to each > other.

Re: psycopg is the new psycopg3?

2020-11-10 Thread Marco Beri
On Tue, 10 Nov 2020 at 18:45, Federico Di Gregorio wrote: > > Anyone against using "psycopg" as package name, and starting from 3 as > > version number? > > Seems fine to me. > For what is worth my opinion, I, too, think psycopg alone is ok. Ciao. Marco.

Re: psycopg is the new psycopg3?

2020-11-10 Thread Federico Di Gregorio
On 10/11/20 18:12, Daniele Varrazzo wrote: Hello, I have received some concerned voices in regard to have a package called "psycopg3". I guess many have been burned out by the Python 2 to 3 transition, and now it's not a happy pair of number to see next to each other. Sorry, Fibonacci... Th

Re: psycopg is the new psycopg3?

2020-11-10 Thread Ethan Furman
On 11/10/20 9:24 AM, Rory Campbell-Lange wrote: On 10/11/20, Daniele Varrazzo (daniele.varra...@gmail.com) wrote: Anyone against using "psycopg" as package name, and starting from 3 as version number? Personally I think the "3" in "psycopg3" is clearer than simply "psycopg" in relation to this

Re: psycopg is the new psycopg3?

2020-11-10 Thread Rory Campbell-Lange
On 10/11/20, Daniele Varrazzo (daniele.varra...@gmail.com) wrote: > Anyone against using "psycopg" as package name, and starting from 3 as > version number? Personally I think the "3" in "psycopg3" is clearer than simply "psycopg" in relation to this being an evolution of the psycopg2 package. Ro

psycopg is the new psycopg3?

2020-11-10 Thread Daniele Varrazzo
Hello, I have received some concerned voices in regard to have a package called "psycopg3". I guess many have been burned out by the Python 2 to 3 transition, and now it's not a happy pair of number to see next to each other. Sorry, Fibonacci... The rationale behind having the 2 in the package na