Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store client encoding in data part of PG::Connection and PG::Result o…
…bjects The previous solution used MRI's internal bits to store the connection encoding. This still works, but is only supported for String and some other types of VALUEs since ruby-2.6. Non-encoding capable objects are no longer allowed to use these bits. To save some bytes of struct size of PG::Result, we're using bit fields for enc_idx and autoclear. This patch also removes the cache from pgconn_external_encoding(). It was useful in the past, when the encoding retrievel was slow. In the meantime the cache did an improvement of factor 3 only. Therefore as external_encoding is a very infrequently called method, there is no need for a cache any longer. Fixes ged#280
- Loading branch information