Manni Wood
1061b1f978
Adds Xid type
2016-09-03 18:04:55 -04:00
Manni Wood
7dbfd4bf4b
Switches oid to uint32
2016-09-01 22:55:18 -04:00
Martin Hamrle
9f6b99e332
Cleanups
...
Cleanups suggested by gometalinter tools.
2016-08-30 20:05:44 +02:00
Jack Christensen
5f7d01778e
Add CopyTo to support PostgreSQL copy protocol
...
fixes #102
2016-08-10 16:27:44 -05:00
Jack Christensen
b596fa3455
Avoid allocation for WriteBuf on query
2016-04-30 13:32:19 -05:00
Jack Christensen
fd39261551
Use binary transcoding for inet/cidr
...
fixes #87
2015-09-03 11:39:32 -05:00
Jack Christensen
5bb7f64dac
Add more error fields to PgError
2015-05-01 18:06:17 -05:00
Andy Walker
f715715c86
add support for EmptyQueryResponse
2014-09-26 17:14:28 -04:00
Jack Christensen
174929c406
Update obsolete documentation refs to TextEncoder and BinaryEncoder
2014-09-19 17:47:47 -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
a5f082fa03
Extract more error information
2014-09-15 14:52:32 -05:00
Jack Christensen
61bf7d841a
Always use bound parameters
...
PostgreSQL has two string syntaxes, one that allows backslash escapes and one
that does not (SQL standard conforming strings). By default PostgreSQL uses
standard conforming strings. QuoteString was only designed for use with
standard conforming strings. If PostgreSQL was configured with certain
combinations of the standard_conforming_strings and backslash_quote settings,
QuoteString may not correctly sanitize strings. QuoteString was only used in
unprepared queries, bound parameters are used for prepared queries.
This commit alters pgx to use always use bound parameters.
As a consequence of never doing string interpolation there is no need to have
separate Text and Binary encoders. There is now only the Encoder interface.
This change had a negative effect on the performance of simple unprepared
queries, but prepared statements should already be used for performance.
fixes #26
https://github.com/jackc/pgx/issues/26
2014-07-18 16:51:11 -05:00
Jack Christensen
aff5043df9
Added a lot of documentation
2014-07-12 21:17:38 -05:00
Jack Christensen
aa6e9d0ddf
Improve prepared statement performance
...
* Do not use bufio.Writer - use net.Conn directly
* Use byte slice instead of bytes.Buffer when building query message
* Use binary.BigEndian.* instead of binary.Write
2014-06-23 18:26:15 -05:00
Jack Christensen
0e30c0ae61
Fix: Prepare statement without result set
2013-08-05 11:30:20 -05:00
Derek Parker and Jack Christensen
b271dd5bf1
Add listen/notify
...
fixes #8
2013-07-19 17:01:38 -05:00
Jack Christensen
df0a537f59
Make Oid public
2013-07-15 08:28:33 -05:00
Jack Christensen
5073a3b9e0
Dirty, but somewhat working prepared statements and extended protocol
2013-07-01 15:41:20 -05:00
Jack Christensen
78590be058
Made many things public so SelectFunc is actually usable by others
...
Definitely, need to add higher level methods for other packages to
use. May rehide some of these interfaces at that point.
2013-04-26 17:06:49 -05:00
Jack Christensen
310c7f5fd8
go fmt
2013-04-19 15:48:45 -05:00
Jack Christensen
d306d42afb
Added conn.Execute to run arbitrary SQL without a result set
...
fixed #13
2013-04-16 20:13:06 -05:00
Jack Christensen
3a85bae314
package name is pgx not pqx
2013-04-12 08:07:05 -05:00
Jack Christensen
7683e5cfa7
go fmt
2013-04-11 21:12:02 -05:00
Jack Christensen
0e8f00e11c
Added understanding of error messages from server
2013-04-11 20:22:55 -05:00
Jack Christensen
63d16ae3ac
Refactor
2013-04-08 21:23:25 -05:00
Jack Christensen
d1a586ed64
go fmt
2013-04-08 20:16:49 -05:00
Jack Christensen
98890b1a50
Store backend pid and secret key
2013-04-08 20:15:34 -05:00
Jack Christensen
34e47ed59e
Store runtime parameters
2013-04-08 20:00:48 -05:00
Jack Christensen
aff1eee892
Basic query functionality
2013-04-06 14:52:08 -04:00
Jack Christensen
e37c0c9e3a
Parse messages up to ready for query
2013-03-30 20:56:51 -05:00
Jack Christensen
aefc85a67b
Parse ParameterStatus
2013-03-30 20:28:23 -05:00
Jack Christensen
226142ae1b
Added rxMsg*
2013-03-30 19:57:37 -05:00
Jack Christensen
18e225b66d
go fmt
2013-03-30 18:13:40 -05:00
Jack Christensen
05f94f7107
Messages use Bytes instead of WriteTo
2013-03-30 18:08:47 -05:00
Jack Christensen
5563e0c825
Extracting connection
2013-03-30 17:56:31 -05:00
Jack Christensen
6fb92c12b8
Use message names matching PostgreSQL docs
2013-03-30 17:13:35 -05:00
Jack Christensen
9c12da11f7
Added startup message
2013-03-30 16:50:36 -05:00