|
11 | 11 | some sense into a confusing situation, this document was drawn. |
12 | 12 |
|
13 | 13 |
|
14 | | -client_encoding GUC should be altered carefully |
15 | | ------------------------------------------------ |
| 14 | +client_encoding setting should be altered carefully |
| 15 | +--------------------------------------------------- |
16 | 16 |
|
17 | 17 | `postgresql.driver`'s streaming cursor implementation reads a fixed set of rows |
18 | 18 | when it queries the server for more. In order to optimize some situations, the |
|
49 | 49 | value of the target server will allow the driver to properly encode *some* of |
50 | 50 | the parameters. Also, any GUC parameters passed via the `settings` parameter |
51 | 51 | should use typed objects when possible to hint that the server encoding should |
52 | | -not be used on that parameter. |
| 52 | +not be used on that parameter(`bytes`, for instance). |
53 | 53 |
|
54 | 54 |
|
55 | 55 | Backslash characters are being treated literally |
56 | 56 | ------------------------------------------------ |
57 | 57 |
|
58 | 58 | The driver enables standard compliant strings. Stop using non-standard features. |
59 | 59 | ;) |
| 60 | +
|
| 61 | +If support for non-standard strings was provided it would require to the |
| 62 | +driver to provide subjective quote interfaces(eg, db.quote_literal). Doing so is |
| 63 | +not desirable as it introduces difficulties for the driver *and* the user. |
| 64 | +
|
| 65 | +
|
| 66 | +Types without binary support in the driver are unsupported in arrays and records |
| 67 | +-------------------------------------------------------------------------------- |
| 68 | +
|
| 69 | +When an array or composite type is identified, `postgresql.protocol.typio` |
| 70 | +ultimately chooses the binary format for the transfer of the column or |
| 71 | +parameter. When this is done, PostgreSQL will pack or expect *all* the values |
| 72 | +in binary format as well. If that binary format is not a ``client_encoding`` |
| 73 | +string, it will fail to unpack the row or pack the appropriate data for the |
| 74 | +element or attribute. |
| 75 | +
|
| 76 | +In, most cases issues related to this can be avoided with exlicit casts to text. |
60 | 77 | ''' |
61 | 78 |
|
62 | 79 | __docformat__ = 'reStructuredText' |
|
0 commit comments