3859 Commits

Author SHA1 Message Date
Jack Christensen
3dc509df94 Rename array files 2017-03-11 16:53:07 -06:00
Jack Christensen
a231c5461f Move Tid to pgtype 2017-03-11 16:48:37 -06:00
Jack Christensen
6694e0e618 Move Tid to pgtype 2017-03-11 16:48:37 -06:00
Jack Christensen
f10ed4ff5d Remove unused function 2017-03-11 16:14:13 -06:00
Jack Christensen
2f63514c47 Move ACLItem to pgtype 2017-03-11 16:13:05 -06:00
Jack Christensen
fa1c81fec4 Move ACLItem to pgtype 2017-03-11 16:13:05 -06:00
Jack Christensen
b0cd63bcf0 Remove unused ScannerV3 2017-03-11 15:44:21 -06:00
Jack Christensen
86620c5e91 Add pgtype.ByteaArray
Also fix up quoting array elements for text arrays.
2017-03-11 13:32:32 -06:00
Jack Christensen
77c57c780d Add pgtype.ByteaArray
Also fix up quoting array elements for text arrays.
2017-03-11 13:32:32 -06:00
Jack Christensen
e654d1f0fc pgtype.Encode(Binary|Text) do not write length
To aid in composability, these methods no longer write their own length. This
is especially useful for text formatted arrays and may be useful for future
database/sql compatibility. It also makes the code a little simpler as the
types no longer have to compute their own size.

Along with this, these methods cannot encode NULL. They now return a boolean
if they are NULL. This also benefits text array encoding as numeric arrays
require NULL to be exactly `NULL` while string arrays require NULL to be
`"NULL"`.
2017-03-11 12:45:30 -06:00
Jack Christensen
1f3e484ca1 pgtype.Encode(Binary|Text) do not write length
To aid in composability, these methods no longer write their own length. This
is especially useful for text formatted arrays and may be useful for future
database/sql compatibility. It also makes the code a little simpler as the
types no longer have to compute their own size.

Along with this, these methods cannot encode NULL. They now return a boolean
if they are NULL. This also benefits text array encoding as numeric arrays
require NULL to be exactly `NULL` while string arrays require NULL to be
`"NULL"`.
2017-03-11 12:45:30 -06:00
Jack Christensen
6c26c3a4a3 Improve replication test reliability
It was failing intermittently when run concurrently.
2017-03-11 11:17:51 -06:00
Jack Christensen
361a54abb7 Decode(Text|Binary) now accepts []byte instead of io.Reader 2017-03-10 16:08:47 -06:00
Jack Christensen
8162634259 Decode(Text|Binary) now accepts []byte instead of io.Reader 2017-03-10 16:08:47 -06:00
Jack Christensen
2db04c3a02 Add *Conn.CopyFrom
This replaces *Conn.CopyTo. CopyTo was named incorrectly. In PostgreSQL
COPY FROM is the command that copies from the client to the server. In
addition, CopyTo does not accept a schema qualified table name. This
commit introduces the Identifier type which handles multi-part names and
correctly quotes/sanitizes them. The new CopyFrom method uses this
Identifier type.

Conn.CopyTo is deprecated.

refs #243 and #190
2017-03-10 14:25:39 -06:00
Jack Christensen
bb7122d4a8 Fix typed_array_gen.sh typo 2017-03-09 21:09:36 -06:00
Jack Christensen
ac9228a1a3 Fix typed_array_gen.sh typo 2017-03-09 21:09:36 -06:00
Jack Christensen
8fa9afbb36 Add bytea 2017-03-09 21:07:40 -06:00
Jack Christensen
bac4af13bb Add bytea 2017-03-09 21:07:40 -06:00
Jack Christensen
eea6e5a64c Move "char" to pgtype 2017-03-07 19:39:57 -06:00
Jack Christensen
fa36ad9196 Move "char" to pgtype 2017-03-07 19:39:57 -06:00
Jack Christensen
94612427ed Move Name to pgtype 2017-03-06 17:55:20 -06:00
Jack Christensen
7b1dbd8558 Move Name to pgtype 2017-03-06 17:55:20 -06:00
Jack Christensen
5702f34407 Fix replication with context
The normal connection context timeout cancels the current query. That isn't
appropriate for a replication connection.
2017-03-05 14:00:38 -06:00
Jack Christensen
071f4cc2ad Conn.Close waits for server to close connection 2017-03-05 13:47:28 -06:00
Jack Christensen
b139307f5b Move OID to pgtype 2017-03-05 13:05:49 -06:00
Jack Christensen
af8519991e Move OID to pgtype 2017-03-05 13:05:49 -06:00
Jack Christensen
6f9aef67c7 Fix comment on XID 2017-03-05 09:18:50 -06:00
Jack Christensen
f66b80c387 Fix comment on XID 2017-03-05 09:18:50 -06:00
Jack Christensen
603d829611 Extract pguint32 2017-03-05 09:13:25 -06:00
Jack Christensen
164bf9eebe Extract pguint32 2017-03-05 09:13:25 -06:00
Jack Christensen
8922421ad6 Move XID to pgypte 2017-03-05 09:07:07 -06:00
Jack Christensen
cb1c05476f Move XID to pgypte 2017-03-05 09:07:07 -06:00
Jack Christensen
3aad9c08d5 Generalize array template 2017-03-05 08:59:26 -06:00
Jack Christensen
0f68bdcd52 Generalize array template 2017-03-05 08:59:26 -06:00
Jack Christensen
0437c9f5d6 Move cid to pgtype 2017-03-04 22:12:03 -06:00
Jack Christensen
575574cf98 Move cid to pgtype 2017-03-04 22:12:03 -06:00
Jack Christensen
12ac0c33b8 Remove unused array code from pgx 2017-03-04 21:23:57 -06:00
Jack Christensen
4254e5f2d2 Add text to pgtype 2017-03-04 21:20:56 -06:00
Jack Christensen
fa57904d6b Add text to pgtype 2017-03-04 21:20:56 -06:00
Jack Christensen
b1fc8109db Remove AF_INET fetching system
Also remove old encode/decode inet/cidr code. This removed some functionality
from Rows.Values, but that entire system will soon change anyway.
2017-03-04 18:00:51 -06:00
Jack Christensen
005916166a Remove behavior migrated to pgtype 2017-03-04 17:43:12 -06:00
Jack Christensen
93e1715082 Add inet and cidr to pgtype 2017-03-04 17:33:41 -06:00
Jack Christensen
4cdea13f0f Add inet and cidr to pgtype 2017-03-04 17:33:41 -06:00
Jack Christensen
0f115477de Add float4, float8 and arrays 2017-03-04 13:29:04 -06:00
Jack Christensen
2010bea555 Add float4, float8 and arrays 2017-03-04 13:29:04 -06:00
Jack Christensen
39b60605ae Add timestamp to pgtype 2017-03-04 12:36:24 -06:00
Jack Christensen
3179e2debc Add timestamp to pgtype 2017-03-04 12:36:24 -06:00
Jack Christensen
34c5070371 Add arrays to all other pgtypes 2017-03-04 11:48:53 -06:00
Jack Christensen
ffb949054d Add arrays to all other pgtypes 2017-03-04 11:48:53 -06:00