mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-01-31 09:24:07 +03:00
#warning fix.
This commit is contained in:
parent
1ac75e3b80
commit
0ce5207871
20
ChangeLog
20
ChangeLog
|
@ -1,14 +1,20 @@
|
|||
2006-06-11 Federico Di Gregorio <fog@initd.org>
|
||||
|
||||
* Applied patch to adapt an empty list into an empty array
|
||||
and not to NULL (from iGGy, closes: #108).
|
||||
* psycopg/adapter_binary.c: as below.
|
||||
|
||||
* Applied patch from wkv to avoid under-allocating query
|
||||
space when the parameters are not of the right type
|
||||
(Closes: #110).
|
||||
* psycopg/adapter_qstring.c: wrapped #warning in #ifdef __GCC__
|
||||
because other compilers don't have it and it will just break
|
||||
compilation (patch from jason, our great win32 builder).
|
||||
|
||||
* Applied patch from wkv to avoid off by one allocation of
|
||||
connection encoding string (Closes: #109).
|
||||
* psycopg/adapter_list.c: applied patch to adapt an empty list
|
||||
into an empty array and not to NULL (from iGGy, closes: #108).
|
||||
|
||||
* psycopg/cursor_type.c: applied patch from wkv to avoid
|
||||
under-allocating query space when the parameters are not of the
|
||||
right type (Closes: #110).
|
||||
|
||||
* psycopg/connection_int.c: applied patch from wkv to avoid off
|
||||
by one allocation of connection encoding string (Closes: #109).
|
||||
|
||||
2006-06-09 Federico Di Gregorio <fog@initd.org>
|
||||
|
||||
|
|
|
@ -46,7 +46,9 @@ binary_escape(unsigned char *from, unsigned int from_length,
|
|||
(PG_MAJOR_VERSION == 8 && PG_MINOR_VERSION == 1 && PG_PATCH_VERSION >= 4)
|
||||
return PQescapeByteaConn(conn, from, from_length, to_length);
|
||||
#else
|
||||
#ifdef __GNUC__
|
||||
#warning "YOUR POSTGRESQL VERSION IS TOO OLD AND IT CAN BE INSECURE"
|
||||
#endif
|
||||
return PQescapeBytea(from, from_length, to_length);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -47,7 +47,9 @@ qstring_escape(char *to, char *from, size_t len, PGconn *conn)
|
|||
int err;
|
||||
return PQescapeStringConn(conn, to, from, len, &err);
|
||||
#else
|
||||
#ifdef __GNUC__
|
||||
#warning "YOUR POSTGRESQL VERSION IS TOO OLD AND IT CAN BE INSECURE"
|
||||
#endif
|
||||
return PQescapeString(to, from, len);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user