668 Commits

Author SHA1 Message Date
Karl Seguin
109b55f9de support decoding of []time.Time and []bool 2014-12-21 14:35:38 +07:00
Karl Seguin
be663f648c refactor common code for encoding array header 2014-12-21 13:40:45 +07:00
Karl Seguin
67292290cf support for inserting []time.Time into timestamp[] columns 2014-12-21 13:35:39 +07:00
Karl Seguin
d1b42d1c8e support inserting into bool[] 2014-12-21 13:01:24 +07:00
Jack Christensen
3c61b16776 Fix crash reading value after empty array
fixes #51
2014-12-19 08:25:33 -06:00
Jack Christensen
c195d9bb96 Remove unsafe package from float/int conversions 2014-11-21 13:56:07 -06:00
Jack Christensen
721cb1fd20 Update contributions 2014-11-17 20:40:37 -06:00
Jack Christensen
79818c2557 Merge pull request #49 from karlseguin/mem1
reduce unecessary memory allocation
2014-11-17 20:36:57 -06:00
Jack Christensen
57df9258bd Merge pull request #48 from karlseguin/94test
select; is valid in 9.4 (the beta anyways)
2014-11-17 20:33:53 -06:00
Jack Christensen
2e952f0ebf Merge pull request #47 from karlseguin/quickaffected
Use LastIndex instead of Split
2014-11-17 20:32:07 -06:00
Karl Seguin
a8f5ce12c5 Trying to reduce memory allocation. logQueryArgs is called even when
using the default discardLogger. This allocates quite a bit of memory.
Created a default dlogger instance and avoid logging code when that's our
logger. I couldn't think of a better implementation without touching the
Logger interface.

On 100 000 inserts, this brought the allocation down to 58MB from 122MB.
It should also result in some small performance gains.
2014-11-18 07:53:33 +07:00
Karl Seguin
e5b2fbd819 select; is valid in 9.4. This causes the two tests to exec successfully when
we're trying to get a syntax error.
2014-11-17 21:21:08 +07:00
Karl Seguin
04b54f03a5 Use LastIndex instead of Split for better performance getting the number of rows affected from CommandTag 2014-11-16 12:43:47 +07:00
Jack Christensen
d857f18454 Update changelog 2014-11-12 08:15:40 -06:00
Jack Christensen
d2ce556450 ConnPool no longer creates connections just to release them. 2014-11-12 08:11:33 -06:00
Jack Christensen
efea92e8be Fix connection pool close
Close should close successfully acquired connections, not failures.

fixes #45
2014-11-11 17:59:13 -06:00
Jack Christensen
95e9e0b308 Add example of listen/notify support
refs #43
2014-11-01 10:45:18 -05:00
Jack Christensen
f46655d849 Update changelog 2014-10-31 10:34:50 -05:00
Jack Christensen
194a077220 Add test for writing []byte to text/varchar 2014-10-31 10:33:38 -05:00
Hari Bhaskaran
161ec8db6d Support writing to postgres 'text' values from both strings as well as
[]byte. If the input is already []byte, this will avoid having the
caller convert to string and then back to []byte. Potentially saves some
allocs.
2014-10-21 12:09:51 -07:00
Jack Christensen
3beff78461 Release v2.4.0
Update changelog
v2.4.0
2014-10-03 15:00:20 -05:00
Jack Christensen
5edd660971 WaitForNotification detects lost connections quicker
Ping server every 15 seconds while waiting if no traffic has occurred.
2014-10-03 14:58:04 -05:00
Jack Christensen
d5e170cc0f Add stdlib test for []byte 2014-10-03 14:52:33 -05:00
Jack Christensen
4e51ff728f Allow reading any value into []byte 2014-09-27 15:34:52 -05:00
Jack Christensen
6a4284a30c Add test for no-op Exec 2014-09-27 14:40:13 -05:00
Jack Christensen
44f44c1baa Merge pull request #39 from anaxagoras/emptyquery
support EmptyQueryResponse message type
2014-09-27 14:37:13 -05:00
Jack Christensen
9e30e7aa93 Remove duplicate line 2014-09-27 12:20:36 -05:00
Jack Christensen
3d7974ce30 Always use keep-alive on TCP conns 2014-09-27 12:13:10 -05:00
Jack Christensen
a724d7bce6 Merge pull request #38 from anaxagoras/keepalive
Add keep-alive option
2014-09-27 12:04:17 -05:00
Andy Walker
f715715c86 add support for EmptyQueryResponse 2014-09-26 17:14:28 -04:00
Andy Walker
33fb73b8ab name consistency 2014-09-24 18:53:07 -04:00
Andy Walker
b46ee0a951 Add keep-alive option by creating a dialer first, then setting KeepAlive option 2014-09-24 18:38:15 -04:00
Jack Christensen
9c725fcb0d Merge pull request #37 from anaxagoras/master
document ParseHstore
2014-09-22 16:39:57 -05:00
Andy Walker
401fac5fa2 document ParseHstore 2014-09-22 13:22:15 -04:00
Jack Christensen
174929c406 Update obsolete documentation refs to TextEncoder and BinaryEncoder 2014-09-19 17:47:47 -05:00
Jack Christensen
f8e59bbd7d Update changelog 2014-09-19 17:41:01 -05:00
Jack Christensen
0a213e6474 Add hstore to docs 2014-09-19 17:38:35 -05:00
Jack Christensen
98853ea98f more docs 2014-09-19 17:35:00 -05:00
Jack Christensen
11a75aa29e Add tests for NullHstore 2014-09-19 17:34:02 -05:00
Jack Christensen
274a14fe73 Rename NullHstore value to Hstore
Ensure consistency with other Null* types
2014-09-19 16:35:26 -05:00
Jack Christensen
890357732b Add tests for Hstore 2014-09-19 16:30:43 -05:00
Andy Walker
2f1ec582d7 Instead of native map[string]string, use type pgx.Hstore instead 2014-09-19 15:27:15 -05:00
Andy Walker
821605a8dd Adding hstore support. map[string]string will encode to hstores and throw errors on hstores with NULL values, and there is now a NullHstore type that is basically map[string]NullString and will both accept and decode NULL values properly 2014-09-19 15:27:15 -05:00
Andy Walker
0441bcd8e4 spurious return 2014-09-19 15:27:15 -05:00
Jack Christensen
8f81acfb5f Enhance support for custom types
* Add per connection oid to name map
* Global default type format is now based on names not oids
* Add better docs for custom types
2014-09-19 15:27:15 -05:00
Jack Christensen
68034af721 Started a changelog v2.3.0 2014-09-16 16:59:13 -05:00
Brian Dunn and Jack Christensen
3e174dda8b Remove debug Println 2014-09-16 16:52:42 -05:00
Brian Dunn and Jack Christensen
a68115fc03 Fix data race with Rows and ConnPool
In an effort to reduce memory allocations, Rows was stored on the
Conn. This caused a race condition where Rows are closed and this
returns the Conn to the Pool. The Pool could then give out the Conn
again. Rows would then be reanimated and the original Rows could reclose
it.
2014-09-16 16:29:45 -05:00
Jack Christensen
a5f082fa03 Extract more error information 2014-09-15 14:52:32 -05:00
Jack Christensen
92cbc6566d Fix log truncation 2014-09-15 14:27:28 -05:00