Daniele Varrazzo
bc5e2aeead
Keep into account psycopg build in lo64 tests
2014-12-25 15:06:18 +01:00
Daniele Varrazzo
2f862972c9
Guard against overflows when using the lo32 api
...
If psycopg supports lo64 but the server doesn't the user may pass values
that would overflow the api range, resulting in:
lo.seek((2<<30))
*** OperationalError: ERROR: invalid seek offset: -2147483648
Also improved the error messages and guard against INT_MIN for negative
seek offsets.
2014-12-25 15:06:18 +01:00
Daniele Varrazzo
79df47a146
Fixed mismatched types in debug print
2014-12-25 15:06:18 +01:00
Daniele Varrazzo
44219bf366
Don't try and compile lo64 support on 32 bits Python
...
We can't fit more than 31 bits in a long anyway.
2014-12-25 15:06:18 +01:00
Daniele Varrazzo
b2327b0fc7
Add the flag 'lo64' to the version if psycopg supports the lo_*64 api
2014-12-25 15:06:18 +01:00
Daniele Varrazzo
0205d6ca2e
Use ifdef instead of if to check LO64
2014-12-25 15:06:18 +01:00
Daniele Varrazzo
91eabf5fcb
Fixed check for PG version
...
It would have failed in PostgreSQL 10.0.
2014-12-25 15:06:18 +01:00
Blake Rouse
e5bbde9554
Check server_version before using lo_*64 functions. If less tahn 9.3 old none 64bit functions will be use.
2014-12-25 15:06:18 +01:00
Blake Rouse
cd67d3d2fe
Modify truncate to use lo_truncate64. Use HAVE_LO64 define to use new lo_*64 methods. Check size of offset and length for versions without LO64.
2014-12-25 15:06:18 +01:00
Blake Rouse
e13ec67da3
Use lseek64 and ltell64 to support large object greater than 2gb in size.
2014-12-25 15:06:18 +01:00
Federico Di Gregorio
85ba098cd8
Merge pull request #273 from eriklee/master
...
Correct exausted -> exhausted typo in exception
2014-11-17 22:36:47 +01:00
Erik Lee
e9f54a2d6e
Correct exausted -> exhausted typo
2014-11-17 17:01:00 +00:00
Federico Di Gregorio
096e0729d5
Merge pull request #272 from yoloseem/timetz
...
Cast time into timetz when the tzinfo field is set.
2014-11-13 10:07:02 +01:00
Hyunjun Kim
4dbda02145
Cast time into timetz when the tzinfo field is set.
2014-11-13 17:32:06 +09:00
Federico Di Gregorio
0d553269d5
Merge pull request #271 from tokheim/master
...
Correction to type adaption example
It is OK for an adapted object to return the escaped string on
__str__ calls but getquoted() is the canonical method.
2014-11-03 21:21:10 +01:00
Asmund Tokheim
ab4afd0e2f
Correction to type adaption example, making it more transparent
2014-11-02 14:15:51 +01:00
Daniele Varrazzo
1b48033345
Don't try to close the server cursor in error state
...
`close()` is implicitly called by `__exit__()`, so an exit on error
would run a query on a inerr connection, causing another exception
hiding the original one. The fix is on `close()`, not on `__exit__()`,
because the semantic of the latter is simply to call the former.
Closes #262 .
2014-09-16 06:57:34 +01:00
Daniele Varrazzo
48a32b766b
In 2010 I couldn't speak English
2014-09-16 06:57:34 +01:00
Tomer Chachamu
6de7315210
Fix typo in docs
2014-09-01 16:29:38 +01:00
Daniele Varrazzo
b4d38c455c
Don't need to build the env for a sdist
...
After 2.5 we are not releasing the html docs in the sdist anymore.
2014-09-01 16:29:38 +01:00
Daniele Varrazzo
7faa06ce0b
Added scripts to release and upload docs
2014-09-01 16:29:38 +01:00
Daniele Varrazzo
9fdfa86200
Release notes cleanup before releasing 2.4.5
2014-08-31 03:06:50 +01:00
Daniele Varrazzo
6210af2763
Fixed excessively strict notices test
...
Failing with PG 9.4 because it generates other debug messages during the
test run (rehashing catalog cache).
2014-08-31 03:06:33 +01:00
Daniele Varrazzo
8e06a51884
Added plural version of the tickets role
2014-08-31 03:05:03 +01:00
Daniele Varrazzo
7d81c48849
Point tickets to GitHub instead of Lighthouse
...
Keep into account the numbers reshuffling: Lighthouse bugs with a number
matching a GitHub merge request are shifted ahead.
2014-08-31 03:05:03 +01:00
Daniele Varrazzo
37d80f2c03
Use the readme as PyPI desctiption
2014-08-31 02:59:49 +01:00
Daniele Varrazzo
6705e4051d
Dropped creation of errcodes with missing spec field
...
On further inspection these names are just aliases for values already
defined: we don't need the duplication.
2014-08-28 02:17:57 +01:00
Daniele Varrazzo
ccc30e1877
Clear adapters in test to maintain reference count
2014-08-28 02:17:54 +01:00
Daniele Varrazzo
2d601ef157
Fixed memory leak with large objects
...
Deallocating closed large objects failed to decrement the connection
refcount. The fact the lobject is closed doesn't matter for refcount.
Issue detected by the always useful scripts/refcounter.py
With an extra bit of unrequested whitespace love.
2014-08-28 02:17:52 +01:00
Daniele Varrazzo
ea54aa77ed
Added test to verify _psycopg can be imported
2014-08-28 02:17:49 +01:00
Daniele Varrazzo
54d904138d
Don't import psycopg2.tz into the C extension
...
This makes possible to import _psycopg directly, after adding the
package directory to the pythonpath. This enables hacks such as:
sys.path.insert(0, '/path/to/psycopg2')
import _psycopg
sys.modules['psycopg2._psycopg'] = _psycopg
sys.path.pop(0)
which can work around e.g. the problem of #201 , freeze that cannot
freeze psycopg2. Well, freeze cannot freeze it because it's just not
designed to deal with C extensions. At least now the frozen application
can hack the pythonpath and work around the limitation by importing
_psycopg as above and then doing the rest of the imports normally.
Keeping long-lived references to python objects is bad anyway: the
tz module couldn't be reloaded before.
2014-08-28 02:17:46 +01:00
Daniele Varrazzo
df9fbc515d
Direct link to the install docs in the readme
2014-08-24 23:33:14 +01:00
Daniele Varrazzo
f7ee006bef
Use virtualenv as build environment for the docs
2014-08-24 23:11:07 +01:00
Daniele Varrazzo
4a4e0d8f9a
Self-updating copyright year in docs
2014-08-24 23:07:22 +01:00
Daniele Varrazzo
c1da93a7b2
Document we known 9.4 errorcodes
2014-08-24 22:11:21 +01:00
Daniele Varrazzo
b8b15637aa
Take the PYTHONPATH into account when building the docs
2014-08-24 22:11:02 +01:00
Daniele Varrazzo
2ad67ee56e
Move the extras
module up in the docs
...
It is more interesting than `tz` and `pool`.
2014-08-24 22:10:24 +01:00
Daniele Varrazzo
843de765a1
Fixed doc example about Error attributes
...
Catch the Error, not everything!
Also, whitespaces.
2014-08-24 22:08:33 +01:00
Daniele Varrazzo
afdb7422fb
Merge branch 'clean-text-files'
2014-08-24 02:06:27 +01:00
Daniele Varrazzo
c0e94ad01f
Dropped outdated HACKING file
2014-08-24 02:06:09 +01:00
Daniele Varrazzo
2be26804d3
Dropped content from the INSTALL file
...
The docs have it right.
2014-08-24 02:06:09 +01:00
Daniele Varrazzo
d8bbaf0481
Added info about running the test suite in the docs
...
They were in the INSTALL file, which is quite out-of-date now.
Also fixed a couple of other things.
2014-08-24 02:06:09 +01:00
Daniele Varrazzo
353b36c657
Readme cleaned up and converted to reST
...
Dropped outdated info and references to the INSTALL, which is less
up-to-date than the docs.
Converted to reST to have it prettier on GitHub.
2014-08-24 02:06:09 +01:00
Daniele Varrazzo
0ea7798122
Merge branch 'drop-flags'
2014-08-24 02:05:23 +01:00
Daniele Varrazzo
1d729ab40e
Dropped HAVE_PQFREEMEM flag
...
It was necessary before PG 7.4, in versions which have long been unsupported.
2014-08-24 01:43:12 +01:00
Daniele Varrazzo
68a4308c3d
Dropped PSYCOPG_NEW_BOOLEAN flag
...
Introduced in 2.0 beta 8, 2006 A.D. Went absolutely untouched in 8 years
of refactoring, when Python 2.5 and PostgreSQL 8.1 roamed the earth.
I would say it has stood the test of the time.
2014-08-24 01:25:02 +01:00
Daniele Varrazzo
6e841a41e6
Dropped PSYCOPG_EXTENSIONS flag
...
Building without extensions has been long broken and nobody really cares
about a pure-DBAPI implementation (which could be created using a wrapper
instead).
2014-08-23 19:30:48 +01:00
Daniele Varrazzo
6a5f778361
Merge branch 'withhold-transactions'
2014-08-21 05:55:11 +01:00
Daniele Varrazzo
d20c03310d
Document WITH HOLD corrections.
2014-08-21 05:53:07 +01:00
Alexey Borzenkov
13b0852619
Allow using named with hold cursors in autocommit
2014-08-21 05:35:11 +01:00