Commit Graph

792 Commits (e5707023cac7c07342b8c910e480d09a1caaf6ee)

Author SHA1 Message Date
Jack Christensen 448d748991 Merge branch 'master' into v3-experimental 2016-08-02 14:54:11 -05:00
Jack Christensen 09f1ca5b00 Fix LogLevelFromString doc formatting 2016-08-02 14:53:10 -05:00
Jack Christensen 390f75c0e1 Reduce Logger interface to Log method 2016-08-02 14:42:31 -05:00
Jack Christensen 04c02cf3d3 Rename Json(b) to JSON(B) 2016-08-02 13:35:52 -05:00
Jack Christensen 214443deb7 Rename Oid to OID 2016-08-02 13:31:55 -05:00
Jack Christensen 2bf3fac594 Add note to README noting the experimental status of v3 2016-08-02 13:22:09 -05:00
Jack Christensen b3eed3cce0 Merge pull request #167 from Michael77/patch-1
Update README.md
2016-08-01 13:19:42 -05:00
Michael77 0a7d8f738e Update README.md 2016-08-01 08:40:50 -07:00
Jack Christensen 558d5550cf Update changelog for ConnPool.Acquire Dialer timeout improvements 2016-07-15 14:51:40 -05:00
Jack Christensen ecf158b086 Track and check number of in-progress acquires 2016-07-15 14:46:50 -05:00
Jack Christensen 7477020000 Test ConnPool non-blocking connections locally
- instead of hitting microsoft.com
2016-07-15 14:45:02 -05:00
Jack Christensen ff5b4f67c3 Merge branch 'Non_blocking_ConnPool_Acquire__jackc' of git://github.com/konstantin-dzreev/pgx into konstantin-dzreev-Non_blocking_ConnPool_Acquire__jackc 2016-07-12 07:40:22 -05:00
Jack Christensen 1a4be31e7a Fix Rows.Values with binary varchar
fixes #161
2016-07-07 08:03:26 -05:00
Jack Christensen 32184fcdaf Update changelog 2016-07-07 07:51:26 -05:00
Jack Christensen a8a990f51b Add test for stdlib query not being logged properly 2016-07-07 07:50:34 -05:00
Jack Christensen f54bfbbdb3 Merge branch 'krzysztofdrys-master' 2016-07-07 07:45:54 -05:00
Jack Christensen 4fc92356df Merge branch 'master' of git://github.com/krzysztofdrys/pgx into krzysztofdrys-master 2016-07-07 07:45:39 -05:00
konstantin b96777edf3 Merge branch 'Non_blocking_ConnPool_Acquire' into tmp
Conflicts:
	conn_pool.go
2016-07-06 16:58:04 +03:00
konstantin 809be4bfcb Make ConnPool.Acquire() non blocking, feedback 2016-07-06 16:22:59 +03:00
Jack Christensen 71d8b5b438 Encode / decode named types with compatible underlying type
Handle string, int, int8, int16, int32, int64, uint, uint8, uint16,
uint32, uint64.
2016-07-05 18:01:44 -05:00
konstantin 7f9373c7c0 Make ConnPool.Acquire() non blocking
When there was an issue with DB server ConnPool.Acquire() used to block
until it heard back from the server or its OpenTimeout hit. If we had
OpenTimeout set to 3 secs, and there were X go routines trying to aquire a
connection in parallel, the very last go routine would receive timeout
error in X*OpenTimeout seconds because of the blocking nature of the
ConnPool.Acquire().

With this commit ConnPool.Acquire() is not blocking any more, and all
X requests will take about 1*OpenTimeout secs to fail.
2016-07-05 18:04:41 +03:00
Krzysztof Dryś ed6ee27a22 Copy sql query from prepared statement to rows.
This enables proper logging of sql query when using stdlib.
2016-06-28 11:08:38 +02:00
Jack Christensen 30cb421551 Add basic record to []interface{} decoding
refs #155
2016-06-21 15:00:47 -05:00
Jack Christensen 9d284da48e Merge pull request #153 from achiku/fix-stdlib-error-message
Fix error message in stdlib
2016-06-06 09:16:07 -05:00
Akira Chiku d05661b5ee Fix error message 2016-06-06 22:54:33 +09:00
Jack Christensen 11e1f70c32 Merge branch 'anil1596-master' 2016-06-01 08:03:47 -05:00
anil1596 db8228ca6e Merge branch '32-bit_overflow_error_fix' 2016-06-01 15:48:56 +05:30
anil1596 16bf1a7cac In func encodeUInt(), case Int8Oid:, changed value to int64(value) and math.MaxInt64 to int64(math.MaxInt64) 2016-06-01 15:42:00 +05:30
anil1596 e334907105 In func encodeUInt(), case Int8Oid:, changed value to int64(value) and math.MaxInt64 to int64(math.MaxInt64) 2016-06-01 13:00:49 +05:30
Jack Christensen 8db0a774d7 Update changelog 2016-05-20 09:34:53 -05:00
Jack Christensen 40f00f4a82 Pass PrepareEx opts as pointer and DRY implementation 2016-05-20 08:30:10 -05:00
Jack Christensen 7954a36b2d Tweak Prepare docs 2016-05-20 08:16:28 -05:00
Jack Christensen b06560aa03 Rename Preparex to PrepareEx 2016-05-20 08:14:56 -05:00
William King a0d005a993 Doc update 2016-05-18 15:08:09 -07:00
William King 682e688c5b Tx prepare/preparex 2016-05-18 15:05:32 -07:00
William King 2ba5bb405b Slight doc update 2016-05-18 13:27:22 -07:00
William King e417cc2f15 Preparex 2016-05-18 13:15:15 -07:00
Jack Christensen 90f22c1717 Don't share inet constant memory between connections 2016-05-12 08:00:53 -05:00
Jack Christensen a488fe026f Every Conn in a ConnPool gets its own PgTypes
Rather than sharing which could allow data races.
2016-05-12 07:51:53 -05:00
Jack Christensen f86340a92c Merge branch 'j16r-lazy_load_inet_constants' 2016-05-12 07:44:39 -05:00
John Barker a282d9df90 Cache connection properties in the pool
This is a quick attempt to improve connection startup time by caching
the properties that are loaded when a connection is ready in the pool,
so that further connections don't incur this cost.

I'm not entirely convinced by the interface here, perhaps these 3 items
could live in their own type and that be passed around for clearer code,
but the idea works well.
2016-05-10 18:34:26 -04:00
Jack Christensen d9fb1351fb Merge branch 'j16r-shrink_pg_type_query_on_connect' 2016-05-10 16:30:11 -05:00
John Barker 3ac09ce728 Reduce the set of types loaded on connect [Fixes #140]
Modify the pg_types query so that it does not load the table array types
that are created when new tables are created.
2016-05-10 14:10:51 -04:00
Jack Christensen 7323d3f5a7 Encode/decode [][]byte to/from bytea[]
fixes #139
2016-04-30 19:07:29 -05:00
Jack Christensen be45d46b37 Update changelog 2016-04-30 14:52:21 -05:00
Jack Christensen 44f4fe0a20 Update travis to use 1.6.2 2016-04-30 14:40:12 -05:00
Jack Christensen 10cea2ec20 Use bufio.Reader.Discard instead of CopyN to ioutil.Discard 2016-04-30 14:11:08 -05:00
Jack Christensen b596fa3455 Avoid allocation for WriteBuf on query 2016-04-30 13:32:19 -05:00
Jack Christensen 9288322a4f Avoid two memory allocations per query
rows can get log and shouldLog from conn instead of needing copied
to self.
2016-04-30 13:06:59 -05:00
Jack Christensen 932a4d6533 Avoid pointless recursive call 2016-04-30 12:58:36 -05:00