Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Activity (RSS)

Friday, June 06 2014
219 Segmentation fault when reading "copy from" in a file was updated
  • Daniele Varrazzo
    • State changed from new to open
    by Daniele Varrazzo at 2:10 PM

    Yup, segfault confirmed: I'll take a look.

  • Martijn Meijers
    Martijn Meijers created the ticket at 7:40 AM

    With this in a file bug.py:

    import sys
    import psycopg2
    DSN = "host={0} dbname={1} user={2} password={3} port={4} sslmode={5}"
    dsn = DSN.format("host", "db", "u...
Tuesday, May 27 2014
180 Return number of rows for copy operations was updated
  • Nicholas Chammas
    Nicholas Chammas commented at 10:10 PM

    Hey Daniele,

    It appears that we are still seeing the -1 rowcount on COPYs in psycopg 2.5.3 when testing against Redshift 1.0.789. This may well be an issue on R...

  • Daniele Varrazzo
    Daniele Varrazzo commented at 7:32 PM

    Hello Bilal,

    yes, it works for me: check the test suite. The changeset is released in psycopg 2.5.3

    Note that old postgres versions (before 8.2) don't return ...

  • Bilal Aslam
    Bilal Aslam commented at 6:02 PM

    Daniele, thanks for checking in the fix. I tried this out on May 27 using the branch you suggested, but I am still getting a rowcount of -1.

    In [36]: cursor.row...

218 Do not depend on pg_config was updated
  • Daniele Varrazzo
    • State changed from new to invalid
    by Daniele Varrazzo at 9:21 PM

    No, we cannot.

    I find hard to think you have libpq installed but not pg_config.

    You can write your own pg_config stub script and fake the questions setup.py mak...

  • Daniele Varrazzo
    Daniele Varrazzo edited a comment at 9:22 PM

    No, we cannot.

    I find hard to think you have libpq installed but not pg_config.

    You can write your own pg_config stub script and fake the questions setup.py mak...

  • Psycopg website
    Psycopg website created the ticket at 4:00 PM

    Submitted by: Alper

    Hello,

    For local development our django project needs to install psycopg even though we do not use it locally.

    This installation depends on ...

Wednesday, May 21 2014
217 assert vs the fine manual was updated
  • Daniele Varrazzo
    • State changed from new to invalid
    by Daniele Varrazzo at 9:36 PM

    More of a wishlist I guess, but the docs state that psycopg2 has "connection" class and "cursor" class. If you believe that:

    assert isinstance( conn, psycopg2....

  • Psycopg website
    Psycopg website created the ticket at 6:19 PM

    Submitted by: dmaziuk@bmrb.wisc.edu

    More of a wishlist I guess, but the docs state that psycopg2 has "connection" class and "cursor" class. If you believe that:

    ...
216 pip install psycopg - fails HTTP 404 was updated
  • Daniele Varrazzo
    • State changed from new to invalid
    by Daniele Varrazzo at 5:33 PM

    It doesn't seem a good idea to mix up the PyPI metadata and pass psycopg2 2.5.3 when you landed on psycopg 1.1.21.

    Just type the name right.

  • Psycopg website
    Psycopg website created the ticket at 3:13 PM

    Submitted by: rosuav@gmail.com

    I tried to install psycopg with 'pip install psycopg', and it went off looking for version 1, which failed (http://initd.org/pub/...

Monday, May 19 2014
201 Python freezed binary cannot use psycopg.so was updated
  • Daniele Varrazzo
    Daniele Varrazzo commented at 1:59 PM

    Christian, extend_path is not designed to fix freeze but for a different use case that doesn't apply to psycopg, so I'm very reluctant to add it. In the past I'...

Saturday, May 17 2014
201 Python freezed binary cannot use psycopg.so was updated
  • Christian Bachmaier
    Christian Bachmaier commented at 5:18 AM

    As far as I can tell, this is exactly as needed. Using debug outputs like

    print(__path__)
    
    from pkgutil import extend_path
    __path__ = extend_path(__path__, __n...
  • Christian Bachmaier
    Christian Bachmaier edited a comment at 5:20 AM

    As far as I can tell, this is exactly as needed. Using debug outputs like

    print(__path__)
    
    from pkgutil import extend_path
    __path__ = extend_path(__path__, __n...
Friday, May 16 2014
201 Python freezed binary cannot use psycopg.so was updated
  • Daniele Varrazzo
    • State changed from invalid to open
    by Daniele Varrazzo at 9:30 PM

    from extend_path docs:

    "This is useful if one wants to distribute different parts of a single logical package as multiple directories"

    This doesn't sound what p...

  • Christian Bachmaier
    Christian Bachmaier commented at 9:07 PM

    Adding

    from pkgutil import extend_path
    __path__ = extend_path(__path__, __name__)
    

    to the top of psycopg2/__init__.py resolves the problem and the frozen binar...

214 Python freeze does not like psycopg2 was updated
  • Daniele Varrazzo
    • State changed from new to invalid
    by Daniele Varrazzo at 9:18 PM

    You should ask that in the aforementioned ticket, not in a new one.

215 psycopg2.OperationalError after postgresql restart was updated
  • Daniele Varrazzo
    • State changed from new to invalid
    by Daniele Varrazzo at 9:06 PM

    I don't know what is a persistent db connection. The error message is perfectly compatible with a server that got restarted: in this case django should discard ...

  • Psycopg website
    Psycopg website created the ticket at 1:28 PM

    Submitted by: Andrew Poliakov

    Python 3.2.3
    Django 1.6.5
    psycopg2 2.5.3

    Django is configured with persistent DB connection. DB connection uses SSL, sslmode=verif...

Thursday, May 15 2014
214 Python freeze does not like psycopg2 was created
Wednesday, May 14 2014
201 Python freezed binary cannot use psycopg.so was updated
  • Christian Bachmaier
    Christian Bachmaier commented at 6:40 AM

    Adding

    from pkgutil import extend_path
    __path__ = extend_path(__path__, __name__)
    

    to the top of psycopg2/__init__.py resolves the problem and the frozen binar...

Monday, May 05 2014
179 Mogrify performance on arrays was updated
  • Daniele Varrazzo
    Daniele Varrazzo commented at 11:26 PM

    I think the speedup you have in mind is not easy to implement; OTOH it can be generalized. The adaptation codepath is not straightforward as it depends on sever...

177 DictRow should behave like an OrderedDict? was updated
205 Inet class does not work for equality check was updated
  • Daniele Varrazzo
    • State changed from open to invalid
    by Daniele Varrazzo at 11:05 PM

    Closing as I have no interest in adding feature to a class that has no reason to exist.

180 Return number of rows for copy operations was updated
  • Daniele Varrazzo
    • State changed from open to resolved
    • Milestone set to psycopg2 2.5.3
    by Daniele Varrazzo at 11:00 PM

    As Rui pointed out the number of rows is returned by PQcmdTuples. We weren't calling this function on copy results but only after normal opreations.

    Fixed in 2....

  • Nicholas Chammas
    Nicholas Chammas commented at 10:00 PM

    On a related note, I have been using psycopg2 with Amazon Redshift and recently asked a similar question about getting the rowcount for COPY statements executed...

213 How do I make a multi-connection data load atomic? was updated
  • Daniele Varrazzo
    • State changed from new to invalid
    by Daniele Varrazzo at 9:55 PM

    Write to the mailing list. You can find info on the website.

    You are looking for two-phase commit.

  • Nicholas Chammas
    Nicholas Chammas created the ticket at 9:30 PM

    This is not a bug. This is a design or best practices question. If this is off-topic here, please direct me appropriately.

    Here is my question: http://stackover...

Friday, May 02 2014
212 psycopg2 as wheel distribution was updated
  • Daniele Varrazzo
    • State changed from new to invalid
    by Daniele Varrazzo at 9:41 AM

    Provide patches if you want it.

  • Psycopg website
    Psycopg website created the ticket at 6:25 AM

    Submitted by: Robert Ziebarth

    Wheel (wheel.readthedocs.org/) is a new package format for python packages. It simplifies installation of packages with c extensio...

Wednesday, April 30 2014
210 Does cursor_factory=None work as expected? was updated
  • Daniele Varrazzo
    • State changed from open to resolved
    by Daniele Varrazzo at 5:06 PM
  • Daniele Varrazzo
    • State changed from new to open
    by Daniele Varrazzo at 4:54 PM
  • Daniele Varrazzo
    Daniele Varrazzo commented at 4:54 PM

    Bug verified: using an explicit connection.cursor(cursor_factory=None) the default behavior is not triggered (using connection.cursor_factory, then psycopg2.ext...

211 connect(cursor_factory=NamedTupleCursor) seems broken was updated
  • Daniele Varrazzo
    • State changed from new to invalid
    by Daniele Varrazzo at 4:35 PM

    The error is pretty obvious:

    ValueError: Type names and field names can only contain alphanumeric characters and underscores: '?column?'
    

    if you want to use a ...

Sunday, April 27 2014
211 connect(cursor_factory=NamedTupleCursor) seems broken was created
  • jagt
    jagt created the ticket at 1:56 AM

    Greetings. As the title suggested, NamedTupleCursor doesn't work well when passing into connect(). Here's a test case:

    import psycopg2
    from psycopg2.extras imp...
Monday, April 21 2014
209 Create escape literal method was updated
  • Daniele Varrazzo
    • State changed from new to open
    • Milestone set to psycopg3
    by Daniele Varrazzo at 9:37 AM

    It's in program for psycopg3, not before.

    Before that you can create your subclass of string, call it Identifier, create an adapter for it and do the double-quo...

  • Alex Shafer
    Alex Shafer created the ticket at 1:59 AM

    I'm currently attempting to create a high-level query builder specific to my application and I need to manually escape literals so they can be added to the quer...

Wednesday, April 16 2014
208 Compatibility with PG 9.3 was updated
  • Daniele Varrazzo
    • State changed from new to invalid
    by Daniele Varrazzo at 4:08 PM

    "2.5.2". yes.

  • Psycopg website
    Psycopg website created the ticket at 4:04 PM

    Submitted by: Arthur

    Hi,

    I just want to know if the latest psycopg 9.5.2 is compatible with new postgres version 9.3

    Thanks

Monday, April 14 2014
207 import error was updated
Friday, April 11 2014
206 IntegrityError constraint_name is empty with postgres-9.1 was updated
  • Dan Milon
    Dan Milon commented at 6:07 AM

    Makes sense then, thank you!

Thursday, April 10 2014
206 IntegrityError constraint_name is empty with postgres-9.1 was updated
  • Daniele Varrazzo
    • State changed from new to invalid
    by Daniele Varrazzo at 11:29 PM

    Yes, it is expected. constraint_name is one of the diag fields that were added to PostgreSQL 9.3.

  • Dan Milon
    Dan Milon created the ticket at 10:14 PM

    We experienced this weird behaviour. An IntegrityError was raised (due to a foreign key constraint failing) by psycopg.

    Under postgres-9.1 .diag.constraint_name...

Saturday, April 05 2014
204 pip fails to build psycopg from url was updated
  • Daniele Varrazzo
    Daniele Varrazzo commented at 3:28 PM

    Thank you for testing. I don't know what zc.buildout expects but at least we have worked around the setuptools issue.

192 enhancement: connection.closed attribute to actually become a property that d... was updated
  • Daniele Varrazzo
    • State changed from open to invalid
    by Daniele Varrazzo at 2:41 PM

    Fixed the poll() and docs reworded. However poll() doesn't notice immediately either that the connection got closed: it takes another roundtrip. Example:

    connec...