4 ms·
It sounds like what you're asking for falls under a 'composite type'. So what you could do is something along the lines of: CREATE TYPE datetimetz AS ( d
by samgaw 8y ago
It sounds like what you're asking for falls under a 'composite type'. So what you could do is something along the lines of:
CREATE TYPE datetimetz AS (
dt timestamptz,
tz varchar
);
Then in your table def you can call your new type to avoid multiple columns:
CREATE TABLE example (
id integer,
created_at datetimetz
);