From: Billy G. A. <bal...@us...> - 2003-06-17 01:28:33
|
Update of /cvsroot/pypgsql/pypgsql In directory sc8-pr-cvs1:/tmp/cvs-serv5130 Modified Files: libpqmodule.c Log Message: 15JUN2003 bga Modified some comments to reflect reality. 02JUN2003 bga Added PG_TIMETZ to the mix [Patch #708013]. Index: libpqmodule.c =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/libpqmodule.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** libpqmodule.c 16 Jun 2003 11:59:41 -0000 1.28 --- libpqmodule.c 17 Jun 2003 01:28:30 -0000 1.29 *************** *** 39,42 **** --- 39,43 ---- | work. I just took the relevant DllMain function from | | the libpq sources and put it here. | + | 15JUN2003 bga Modified some comments to reflect reality. | | 09JUN2003 gh Applied patch from Laurent Pinchart: | | In libPQquoteString, bytea are quoted using as much as | *************** *** 44,47 **** --- 45,49 ---- | allocating (slen * 4) + 3 is not enough for data that | | contain lots of 0x00 bytes. | + | 02JUN2003 bga Added PG_TIMETZ to the mix [Patch #708013]. | | 28NOV2002 bga Fixed changed PG_TIMESTAMP oid, added PG_TIMESTAMPTZ | | and PG_REFCURSOR oids. [Bug #845360] | *************** *** 125,136 **** | 3. The single quote is quoted as \'. | | | ! | 4. The double quote is quoted as \". | | | ! | 5. All other characters are unchanged. | | | ! | Note: The double quote (") is escaped in case the quoted string is | ! | part of a PostgreSQL array, which uses double quotes around | ! | string values instead of single quotes. It saves having to do | ! | a global search and replace of double quotes in Python. | \***********************************************************************/ --- 127,150 ---- | 3. The single quote is quoted as \'. | | | ! | 4. All other characters are unchanged. | | | ! | Note: If the optional forArray argument is 1, then the escaping is | ! | changed as follows: | ! | 1. Control characters are quoted as follows: | | | ! | Value Quoted Representation | ! | ----- --------------------- | ! | NUL * NOT ALLOWED * | ! | BS \\b | ! | TAB \\t | ! | NL \\n | ! | CR \\r | ! | other \OOO where OOO is the octal representation of | ! | the control character's ordinal number. | ! | | ! | 2. The backslash is escpaed as \\\\. | ! | 3. The single quote is escaped as \'. | ! | 4. The double quote is escaped as \\". | ! | 5. All other characters are unchanged. | \***********************************************************************/ *************** *** 707,710 **** --- 721,725 ---- case PG_TID: desc = "tid"; break; case PG_TIME: desc = "time"; break; + case PG_TIMETZ: desc = "timetz"; break; case PG_TIMESTAMP: desc = "timestamp"; break; case PG_TIMESTAMPTZ: desc = "timestamptz"; break; *************** *** 1087,1090 **** --- 1102,1106 ---- PyDict_SetItemString(d, "PG_TID", Py_BuildValue("i", PG_TID)); PyDict_SetItemString(d, "PG_TIME", Py_BuildValue("i", PG_TIME)); + PyDict_SetItemString(d, "PG_TIMETZ", Py_BuildValue("i", PG_TIMETZ)); PyDict_SetItemString(d, "PG_TIMESTAMP", Py_BuildValue("i", PG_TIMESTAMP)); PyDict_SetItemString(d, "PG_TIMESTAMPTZ", Py_BuildValue("i", PG_TIMESTAMPTZ)); |