Skip to content

Commit

Permalink
sql/parser: tuples are named record in postgres
Browse files Browse the repository at this point in the history
Change the entry in pg_type to say record, not tuple.
  • Loading branch information
jordanlewis committed Apr 1, 2017
1 parent f7900cd commit 31cd331
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions pkg/sql/parser/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ var aliasedOidToName = map[oid.Oid]string{
oid.T_bytea: "bytea",
oid.T_varchar: "varchar",
oid.T_numeric: "numeric",
oid.T_record: "record",
oid.T__int2: "int2[]",
oid.T__int4: "int4[]",
oid.T__int8: "int8[]",
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/testdata/logic_test/builtin_function
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,7 @@ VALUES (format_type('anyelement'::regtype, -1)),
(format_type('interval'::regtype, -1)),
(format_type('timestamp'::regtype, -1)),
(format_type('timestamptz'::regtype, -1)),
(format_type('tuple'::regtype, -1))
(format_type('record'::regtype, -1))
----
anyelement
boolean
Expand Down
10 changes: 5 additions & 5 deletions pkg/sql/testdata/logic_test/pg_catalog
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ oid typname typnamespace typowner typlen typbyval typtype
2202 regprocedure 1782195457 NULL 8 true b
2205 regclass 1782195457 NULL 8 true b
2206 regtype 1782195457 NULL 8 true b
2249 tuple 1782195457 NULL 0 true b
2249 record 1782195457 NULL 0 true b
2283 anyelement 1782195457 NULL -1 false b
4089 regnamespace 1782195457 NULL 8 true b

Expand Down Expand Up @@ -710,7 +710,7 @@ oid typname typcategory typispreferred typisdefined typdelim typreli
2202 regprocedure N false true , 0 0 0
2205 regclass N false true , 0 0 0
2206 regtype N false true , 0 0 0
2249 tuple P false true , 0 0 0
2249 record P false true , 0 0 0
2283 anyelement P false true , 0 0 0
4089 regnamespace N false true , 0 0 0

Expand Down Expand Up @@ -745,7 +745,7 @@ oid typname typinput typoutput typreceive typsend
2202 regprocedure regprocedurein regprocedureout regprocedurerecv regproceduresend 0 0 0
2205 regclass regclassin regclassout regclassrecv regclasssend 0 0 0
2206 regtype regtypein regtypeout regtyperecv regtypesend 0 0 0
2249 tuple tuple_in tuple_out tuple_recv tuple_send 0 0 0
2249 record record_in record_out record_recv record_send 0 0 0
2283 anyelement anyelement_in anyelement_out anyelement_recv anyelement_send 0 0 0
4089 regnamespace regnamespacein regnamespaceout regnamespacerecv regnamespacesend 0 0 0

Expand Down Expand Up @@ -780,7 +780,7 @@ oid typname typalign typstorage typnotnull typbasetype typtypmod
2202 regprocedure NULL NULL false 0 -1
2205 regclass NULL NULL false 0 -1
2206 regtype NULL NULL false 0 -1
2249 tuple NULL NULL false 0 -1
2249 record NULL NULL false 0 -1
2283 anyelement NULL NULL false 0 -1
4089 regnamespace NULL NULL false 0 -1

Expand Down Expand Up @@ -815,7 +815,7 @@ oid typname typndims typcollation typdefaultbin typdefault typacl
2202 regprocedure 0 0 NULL NULL NULL
2205 regclass 0 0 NULL NULL NULL
2206 regtype 0 0 NULL NULL NULL
2249 tuple 0 0 NULL NULL NULL
2249 record 0 0 NULL NULL NULL
2283 anyelement 0 0 NULL NULL NULL
4089 regnamespace 0 0 NULL NULL NULL

Expand Down

0 comments on commit 31cd331

Please sign in to comment.