mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-23 01:16:34 +03:00
Remove workarounds for unsupported libpq < 9.1
Per http://initd.org/psycopg/docs/install.html#prerequisites: > PostgreSQL client library version from 9.1
This commit is contained in:
parent
483901ea7b
commit
17dc5a85a3
|
@ -398,12 +398,7 @@ exit:
|
||||||
static PyObject*
|
static PyObject*
|
||||||
psyco_libpq_version(PyObject *self)
|
psyco_libpq_version(PyObject *self)
|
||||||
{
|
{
|
||||||
#if PG_VERSION_NUM >= 90100
|
|
||||||
return PyInt_FromLong(PQlibVersion());
|
return PyInt_FromLong(PQlibVersion());
|
||||||
#else
|
|
||||||
PyErr_SetString(NotSupportedError, "version discovery is not supported in libpq < 9.1");
|
|
||||||
return NULL;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* encrypt_password - Prepare the encrypted password form */
|
/* encrypt_password - Prepare the encrypted password form */
|
||||||
|
|
|
@ -182,14 +182,12 @@ class TestQuotedString(ConnectingTestCase):
|
||||||
|
|
||||||
|
|
||||||
class TestQuotedIdentifier(ConnectingTestCase):
|
class TestQuotedIdentifier(ConnectingTestCase):
|
||||||
@testutils.skip_before_libpq(9, 0)
|
|
||||||
def test_identifier(self):
|
def test_identifier(self):
|
||||||
from psycopg2.extensions import quote_ident
|
from psycopg2.extensions import quote_ident
|
||||||
self.assertEqual(quote_ident('blah-blah', self.conn), '"blah-blah"')
|
self.assertEqual(quote_ident('blah-blah', self.conn), '"blah-blah"')
|
||||||
self.assertEqual(quote_ident('quote"inside', self.conn), '"quote""inside"')
|
self.assertEqual(quote_ident('quote"inside', self.conn), '"quote""inside"')
|
||||||
|
|
||||||
@testutils.skip_before_postgres(8, 0)
|
@testutils.skip_before_postgres(8, 0)
|
||||||
@testutils.skip_before_libpq(9, 0)
|
|
||||||
def test_unicode_ident(self):
|
def test_unicode_ident(self):
|
||||||
from psycopg2.extensions import quote_ident
|
from psycopg2.extensions import quote_ident
|
||||||
snowman = u"\u2603"
|
snowman = u"\u2603"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user