2
0

Name PG types as words

Though this doesn't follow Go naming conventions exactly it makes names more
consistent with PostgreSQL and it is easier to read. For example, TIDOID becomes
TidOid. In addition this is one less breaking change in the move to V3.
This commit is contained in:
Jack Christensen
2017-03-11 17:03:23 -06:00
parent 3dc509df94
commit 743b98b298
51 changed files with 689 additions and 694 deletions
+3 -3
View File
@@ -169,10 +169,10 @@ there.
pgx.DefaultTypeFormats["point"] = pgx.BinaryFormatCode
Note that the type is referred to by name, not by OID. This is because custom
PostgreSQL types like hstore will have different OIDs on different servers. When
Note that the type is referred to by name, not by Oid. This is because custom
PostgreSQL types like hstore will have different Oids on different servers. When
pgx establishes a connection it queries the pg_type table for all types. It then
matches the names in DefaultTypeFormats with the returned OIDs and stores it in
matches the names in DefaultTypeFormats with the returned Oids and stores it in
Conn.PgTypes.
See example_custom_type_test.go for an example of a custom type for the