supabase / postgrest-js

Isomorphic JavaScript client for PostgREST.
https://supabase.com
MIT License
964 stars 128 forks source link

Where can I get the exact spec sheet for `format` property? #544

Closed softmarshmallow closed 3 days ago

softmarshmallow commented 6 days ago

This is a example response from supabase postgrest open api endpoint.

"last_seen_at": {
  "default": "now()",
  "format": "timestamp with time zone",
  "type": "string"
},
"uuid": {
  "format": "uuid",
  "type": "string"
},
"phone": {
  "format": "text",
  "type": "string"
},

I am havving trouble parsing the format since I cannot find any standard refering to timestamp with time zone it's not a postgrest standard nor postgresql standard way of represeting a format.

Where can I find a exact format sheet for this and build a solid parser around it?

Searches..

ChatGPT knows some, but cannot trust these.

UUID: uuid
Text: text
Timestamp: timestamp
Timestamptz: timestamp with time zone
Int2: smallint
Int4: integer
Int8: bigint
Float4: real
Float8: double precision
Json: json
Jsonb: jsonb
Varchar: character varying
Time: time
Timetz: time with time zone
softmarshmallow commented 3 days ago

Here are some useful resources I found.

int, int2, int4, int8, smallint, integer, bigint, decimal, numeric, real, float, float4, float8, double precision, money, character varying, varchar, character, char, text, citext, hstore, bytea, bit, varbit, bit varying, timetz, timestamptz, timestamp, timestamp without time zone, timestamp with time zone, date, time, time without time zone, time with time zone, interval, bool, boolean, enum, point, line, lseg, box, path, polygon, circle, cidr, inet, macaddr, tsvector, tsquery, uuid, xml, json, jsonb, int4range, int8range, numrange, tsrange, tstzrange, daterange, int4multirange, int8multirange, nummultirange, tsmultirange, tstzmultirange, multidaterange, geometry, geography, cube, ltree