4 CREATE TABLE TIMESTAMPTZ_TBL (d1 timestamp(2) with time zone);
5 -- Test shorthand input values
6 -- We can't just "select" the results since they aren't constants; test for
7 -- equality instead. We can do that by running the test inside a transaction
8 -- block, within which the value of 'now' shouldn't change. We also check
9 -- that 'now' *does* change over a reasonable interval such as 100 msec.
10 -- NOTE: it is possible for this part of the test to fail if the transaction
11 -- block is entered exactly at local midnight; then 'now' and 'today' have
12 -- the same values and the counts will come out different.
13 INSERT INTO TIMESTAMPTZ_TBL VALUES ('now');
21 INSERT INTO TIMESTAMPTZ_TBL VALUES ('now');
22 INSERT INTO TIMESTAMPTZ_TBL VALUES ('today');
23 INSERT INTO TIMESTAMPTZ_TBL VALUES ('yesterday');
24 INSERT INTO TIMESTAMPTZ_TBL VALUES ('tomorrow');
25 INSERT INTO TIMESTAMPTZ_TBL VALUES ('tomorrow EST');
26 INSERT INTO TIMESTAMPTZ_TBL VALUES ('tomorrow zulu');
27 SELECT count(*) AS One FROM TIMESTAMPTZ_TBL WHERE d1 = timestamp with time zone 'today';
33 SELECT count(*) AS One FROM TIMESTAMPTZ_TBL WHERE d1 = timestamp with time zone 'tomorrow';
39 SELECT count(*) AS One FROM TIMESTAMPTZ_TBL WHERE d1 = timestamp with time zone 'yesterday';
45 SELECT count(*) AS One FROM TIMESTAMPTZ_TBL WHERE d1 = timestamp(2) with time zone 'now';
52 DELETE FROM TIMESTAMPTZ_TBL;
53 -- verify uniform transaction time within transaction block
55 INSERT INTO TIMESTAMPTZ_TBL VALUES ('now');
62 INSERT INTO TIMESTAMPTZ_TBL VALUES ('now');
69 SELECT count(*) AS two FROM TIMESTAMPTZ_TBL WHERE d1 = timestamp(2) with time zone 'now';
76 DELETE FROM TIMESTAMPTZ_TBL;
78 INSERT INTO TIMESTAMPTZ_TBL VALUES ('-infinity');
79 INSERT INTO TIMESTAMPTZ_TBL VALUES ('infinity');
80 INSERT INTO TIMESTAMPTZ_TBL VALUES ('epoch');
81 -- Obsolete special values
82 INSERT INTO TIMESTAMPTZ_TBL VALUES ('invalid');
83 ERROR: date/time value "invalid" is no longer supported
84 LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('invalid');
86 INSERT INTO TIMESTAMPTZ_TBL VALUES ('undefined');
87 ERROR: date/time value "undefined" is no longer supported
88 LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('undefined');
90 INSERT INTO TIMESTAMPTZ_TBL VALUES ('current');
91 ERROR: date/time value "current" is no longer supported
92 LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('current');
94 -- Postgres v6.0 standard output format
95 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01 1997 PST');
96 -- Variations on Postgres v6.1 standard output format
97 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.000001 1997 PST');
98 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.999999 1997 PST');
99 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.4 1997 PST');
100 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.5 1997 PST');
101 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.6 1997 PST');
103 INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-01-02');
104 INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-01-02 03:04:05');
105 INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01-08');
106 INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01-0800');
107 INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01 -08:00');
108 INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970210 173201 -0800');
109 INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-06-10 17:32:01 -07:00');
110 INSERT INTO TIMESTAMPTZ_TBL VALUES ('2001-09-22T18:19:20');
111 -- POSIX format (note that the timezone abbrev is just decoration here)
112 INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 08:14:01 GMT+8');
113 INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 13:14:02 GMT-1');
114 INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 12:14:03 GMT-2');
115 INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 03:14:04 PST+8');
116 INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 02:14:05 MST+7:00');
117 -- Variations for acceptable input formats
118 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 17:32:01 1997 -0800');
119 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 17:32:01 1997');
120 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 5:32PM 1997');
121 INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997/02/10 17:32:01-0800');
122 INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01 PST');
123 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb-10-1997 17:32:01 PST');
124 INSERT INTO TIMESTAMPTZ_TBL VALUES ('02-10-1997 17:32:01 PST');
125 INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970210 173201 PST');
126 set datestyle to ymd;
127 INSERT INTO TIMESTAMPTZ_TBL VALUES ('97FEB10 5:32:01PM UTC');
128 INSERT INTO TIMESTAMPTZ_TBL VALUES ('97/02/10 17:32:01 UTC');
130 INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997.041 17:32:01 UTC');
131 -- timestamps at different timezones
132 INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970210 173201 America/New_York');
133 SELECT '19970210 173201' AT TIME ZONE 'America/New_York';
135 --------------------------
136 Mon Feb 10 20:32:01 1997
139 INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970710 173201 America/New_York');
140 SELECT '19970710 173201' AT TIME ZONE 'America/New_York';
142 --------------------------
143 Thu Jul 10 20:32:01 1997
146 INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970710 173201 America/Does_not_exist');
147 ERROR: time zone "america/does_not_exist" not recognized
148 LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970710 173201 America...
150 SELECT '19970710 173201' AT TIME ZONE 'America/Does_not_exist';
151 ERROR: time zone "America/Does_not_exist" not recognized
152 -- Daylight saving time for timestamps beyond 32-bit time_t range.
153 SELECT '20500710 173201 Europe/Helsinki'::timestamptz; -- DST
155 ------------------------------
156 Sun Jul 10 07:32:01 2050 PDT
159 SELECT '20500110 173201 Europe/Helsinki'::timestamptz; -- non-DST
161 ------------------------------
162 Mon Jan 10 07:32:01 2050 PST
165 SELECT '205000-07-10 17:32:01 Europe/Helsinki'::timestamptz; -- DST
167 --------------------------------
168 Thu Jul 10 07:32:01 205000 PDT
171 SELECT '205000-01-10 17:32:01 Europe/Helsinki'::timestamptz; -- non-DST
173 --------------------------------
174 Fri Jan 10 07:32:01 205000 PST
177 -- Check date conversion and date arithmetic
178 INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-06-10 18:32:01 PDT');
179 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 17:32:01 1997');
180 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 11 17:32:01 1997');
181 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 12 17:32:01 1997');
182 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 13 17:32:01 1997');
183 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 14 17:32:01 1997');
184 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 15 17:32:01 1997');
185 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1997');
186 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 0097 BC');
187 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 0097');
188 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 0597');
189 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1097');
190 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1697');
191 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1797');
192 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1897');
193 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1997');
194 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 2097');
195 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 28 17:32:01 1996');
196 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 29 17:32:01 1996');
197 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mar 01 17:32:01 1996');
198 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 30 17:32:01 1996');
199 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 1996');
200 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Jan 01 17:32:01 1997');
201 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 28 17:32:01 1997');
202 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 29 17:32:01 1997');
203 ERROR: date/time field value out of range: "Feb 29 17:32:01 1997"
204 LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 29 17:32:01 1997');
206 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mar 01 17:32:01 1997');
207 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 30 17:32:01 1997');
208 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 1997');
209 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 1999');
210 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Jan 01 17:32:01 2000');
211 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 2000');
212 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Jan 01 17:32:01 2001');
213 -- Currently unsupported syntax and ranges
214 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 -0097');
215 ERROR: time zone displacement out of range: "Feb 16 17:32:01 -0097"
216 LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 -0097')...
218 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 5097 BC');
219 ERROR: timestamp out of range: "Feb 16 17:32:01 5097 BC"
220 LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 5097 BC...
222 -- Alternative field order that we've historically supported (sort of)
223 -- with regular and POSIXy timezone specs
224 SELECT 'Wed Jul 11 10:51:14 America/New_York 2001'::timestamptz;
226 ------------------------------
227 Wed Jul 11 07:51:14 2001 PDT
230 SELECT 'Wed Jul 11 10:51:14 GMT-4 2001'::timestamptz;
232 ------------------------------
233 Tue Jul 10 23:51:14 2001 PDT
236 SELECT 'Wed Jul 11 10:51:14 GMT+4 2001'::timestamptz;
238 ------------------------------
239 Wed Jul 11 07:51:14 2001 PDT
242 SELECT 'Wed Jul 11 10:51:14 PST-03:00 2001'::timestamptz;
244 ------------------------------
245 Wed Jul 11 00:51:14 2001 PDT
248 SELECT 'Wed Jul 11 10:51:14 PST+03:00 2001'::timestamptz;
250 ------------------------------
251 Wed Jul 11 06:51:14 2001 PDT
254 SELECT '' AS "64", d1 FROM TIMESTAMPTZ_TBL;
256 ----+---------------------------------
259 | Wed Dec 31 16:00:00 1969 PST
260 | Mon Feb 10 17:32:01 1997 PST
261 | Mon Feb 10 17:32:01 1997 PST
262 | Mon Feb 10 17:32:02 1997 PST
263 | Mon Feb 10 17:32:01.4 1997 PST
264 | Mon Feb 10 17:32:01.5 1997 PST
265 | Mon Feb 10 17:32:01.6 1997 PST
266 | Thu Jan 02 00:00:00 1997 PST
267 | Thu Jan 02 03:04:05 1997 PST
268 | Mon Feb 10 17:32:01 1997 PST
269 | Mon Feb 10 17:32:01 1997 PST
270 | Mon Feb 10 17:32:01 1997 PST
271 | Mon Feb 10 17:32:01 1997 PST
272 | Tue Jun 10 17:32:01 1997 PDT
273 | Sat Sep 22 18:19:20 2001 PDT
274 | Wed Mar 15 08:14:01 2000 PST
275 | Wed Mar 15 04:14:02 2000 PST
276 | Wed Mar 15 02:14:03 2000 PST
277 | Wed Mar 15 03:14:04 2000 PST
278 | Wed Mar 15 01:14:05 2000 PST
279 | Mon Feb 10 17:32:01 1997 PST
280 | Mon Feb 10 17:32:01 1997 PST
281 | Mon Feb 10 17:32:00 1997 PST
282 | Mon Feb 10 17:32:01 1997 PST
283 | Mon Feb 10 17:32:01 1997 PST
284 | Mon Feb 10 17:32:01 1997 PST
285 | Mon Feb 10 17:32:01 1997 PST
286 | Mon Feb 10 17:32:01 1997 PST
287 | Mon Feb 10 09:32:01 1997 PST
288 | Mon Feb 10 09:32:01 1997 PST
289 | Mon Feb 10 09:32:01 1997 PST
290 | Mon Feb 10 14:32:01 1997 PST
291 | Thu Jul 10 14:32:01 1997 PDT
292 | Tue Jun 10 18:32:01 1997 PDT
293 | Mon Feb 10 17:32:01 1997 PST
294 | Tue Feb 11 17:32:01 1997 PST
295 | Wed Feb 12 17:32:01 1997 PST
296 | Thu Feb 13 17:32:01 1997 PST
297 | Fri Feb 14 17:32:01 1997 PST
298 | Sat Feb 15 17:32:01 1997 PST
299 | Sun Feb 16 17:32:01 1997 PST
300 | Tue Feb 16 17:32:01 0097 PST BC
301 | Sat Feb 16 17:32:01 0097 PST
302 | Thu Feb 16 17:32:01 0597 PST
303 | Tue Feb 16 17:32:01 1097 PST
304 | Sat Feb 16 17:32:01 1697 PST
305 | Thu Feb 16 17:32:01 1797 PST
306 | Tue Feb 16 17:32:01 1897 PST
307 | Sun Feb 16 17:32:01 1997 PST
308 | Sat Feb 16 17:32:01 2097 PST
309 | Wed Feb 28 17:32:01 1996 PST
310 | Thu Feb 29 17:32:01 1996 PST
311 | Fri Mar 01 17:32:01 1996 PST
312 | Mon Dec 30 17:32:01 1996 PST
313 | Tue Dec 31 17:32:01 1996 PST
314 | Wed Jan 01 17:32:01 1997 PST
315 | Fri Feb 28 17:32:01 1997 PST
316 | Sat Mar 01 17:32:01 1997 PST
317 | Tue Dec 30 17:32:01 1997 PST
318 | Wed Dec 31 17:32:01 1997 PST
319 | Fri Dec 31 17:32:01 1999 PST
320 | Sat Jan 01 17:32:01 2000 PST
321 | Sun Dec 31 17:32:01 2000 PST
322 | Mon Jan 01 17:32:01 2001 PST
325 -- Demonstrate functions and operators
326 SELECT '' AS "48", d1 FROM TIMESTAMPTZ_TBL
327 WHERE d1 > timestamp with time zone '1997-01-02';
329 ----+--------------------------------
331 | Mon Feb 10 17:32:01 1997 PST
332 | Mon Feb 10 17:32:01 1997 PST
333 | Mon Feb 10 17:32:02 1997 PST
334 | Mon Feb 10 17:32:01.4 1997 PST
335 | Mon Feb 10 17:32:01.5 1997 PST
336 | Mon Feb 10 17:32:01.6 1997 PST
337 | Thu Jan 02 03:04:05 1997 PST
338 | Mon Feb 10 17:32:01 1997 PST
339 | Mon Feb 10 17:32:01 1997 PST
340 | Mon Feb 10 17:32:01 1997 PST
341 | Mon Feb 10 17:32:01 1997 PST
342 | Tue Jun 10 17:32:01 1997 PDT
343 | Sat Sep 22 18:19:20 2001 PDT
344 | Wed Mar 15 08:14:01 2000 PST
345 | Wed Mar 15 04:14:02 2000 PST
346 | Wed Mar 15 02:14:03 2000 PST
347 | Wed Mar 15 03:14:04 2000 PST
348 | Wed Mar 15 01:14:05 2000 PST
349 | Mon Feb 10 17:32:01 1997 PST
350 | Mon Feb 10 17:32:01 1997 PST
351 | Mon Feb 10 17:32:00 1997 PST
352 | Mon Feb 10 17:32:01 1997 PST
353 | Mon Feb 10 17:32:01 1997 PST
354 | Mon Feb 10 17:32:01 1997 PST
355 | Mon Feb 10 17:32:01 1997 PST
356 | Mon Feb 10 17:32:01 1997 PST
357 | Mon Feb 10 09:32:01 1997 PST
358 | Mon Feb 10 09:32:01 1997 PST
359 | Mon Feb 10 09:32:01 1997 PST
360 | Mon Feb 10 14:32:01 1997 PST
361 | Thu Jul 10 14:32:01 1997 PDT
362 | Tue Jun 10 18:32:01 1997 PDT
363 | Mon Feb 10 17:32:01 1997 PST
364 | Tue Feb 11 17:32:01 1997 PST
365 | Wed Feb 12 17:32:01 1997 PST
366 | Thu Feb 13 17:32:01 1997 PST
367 | Fri Feb 14 17:32:01 1997 PST
368 | Sat Feb 15 17:32:01 1997 PST
369 | Sun Feb 16 17:32:01 1997 PST
370 | Sun Feb 16 17:32:01 1997 PST
371 | Sat Feb 16 17:32:01 2097 PST
372 | Fri Feb 28 17:32:01 1997 PST
373 | Sat Mar 01 17:32:01 1997 PST
374 | Tue Dec 30 17:32:01 1997 PST
375 | Wed Dec 31 17:32:01 1997 PST
376 | Fri Dec 31 17:32:01 1999 PST
377 | Sat Jan 01 17:32:01 2000 PST
378 | Sun Dec 31 17:32:01 2000 PST
379 | Mon Jan 01 17:32:01 2001 PST
382 SELECT '' AS "15", d1 FROM TIMESTAMPTZ_TBL
383 WHERE d1 < timestamp with time zone '1997-01-02';
385 ----+---------------------------------
387 | Wed Dec 31 16:00:00 1969 PST
388 | Tue Feb 16 17:32:01 0097 PST BC
389 | Sat Feb 16 17:32:01 0097 PST
390 | Thu Feb 16 17:32:01 0597 PST
391 | Tue Feb 16 17:32:01 1097 PST
392 | Sat Feb 16 17:32:01 1697 PST
393 | Thu Feb 16 17:32:01 1797 PST
394 | Tue Feb 16 17:32:01 1897 PST
395 | Wed Feb 28 17:32:01 1996 PST
396 | Thu Feb 29 17:32:01 1996 PST
397 | Fri Mar 01 17:32:01 1996 PST
398 | Mon Dec 30 17:32:01 1996 PST
399 | Tue Dec 31 17:32:01 1996 PST
400 | Wed Jan 01 17:32:01 1997 PST
403 SELECT '' AS one, d1 FROM TIMESTAMPTZ_TBL
404 WHERE d1 = timestamp with time zone '1997-01-02';
406 -----+------------------------------
407 | Thu Jan 02 00:00:00 1997 PST
410 SELECT '' AS "63", d1 FROM TIMESTAMPTZ_TBL
411 WHERE d1 != timestamp with time zone '1997-01-02';
413 ----+---------------------------------
416 | Wed Dec 31 16:00:00 1969 PST
417 | Mon Feb 10 17:32:01 1997 PST
418 | Mon Feb 10 17:32:01 1997 PST
419 | Mon Feb 10 17:32:02 1997 PST
420 | Mon Feb 10 17:32:01.4 1997 PST
421 | Mon Feb 10 17:32:01.5 1997 PST
422 | Mon Feb 10 17:32:01.6 1997 PST
423 | Thu Jan 02 03:04:05 1997 PST
424 | Mon Feb 10 17:32:01 1997 PST
425 | Mon Feb 10 17:32:01 1997 PST
426 | Mon Feb 10 17:32:01 1997 PST
427 | Mon Feb 10 17:32:01 1997 PST
428 | Tue Jun 10 17:32:01 1997 PDT
429 | Sat Sep 22 18:19:20 2001 PDT
430 | Wed Mar 15 08:14:01 2000 PST
431 | Wed Mar 15 04:14:02 2000 PST
432 | Wed Mar 15 02:14:03 2000 PST
433 | Wed Mar 15 03:14:04 2000 PST
434 | Wed Mar 15 01:14:05 2000 PST
435 | Mon Feb 10 17:32:01 1997 PST
436 | Mon Feb 10 17:32:01 1997 PST
437 | Mon Feb 10 17:32:00 1997 PST
438 | Mon Feb 10 17:32:01 1997 PST
439 | Mon Feb 10 17:32:01 1997 PST
440 | Mon Feb 10 17:32:01 1997 PST
441 | Mon Feb 10 17:32:01 1997 PST
442 | Mon Feb 10 17:32:01 1997 PST
443 | Mon Feb 10 09:32:01 1997 PST
444 | Mon Feb 10 09:32:01 1997 PST
445 | Mon Feb 10 09:32:01 1997 PST
446 | Mon Feb 10 14:32:01 1997 PST
447 | Thu Jul 10 14:32:01 1997 PDT
448 | Tue Jun 10 18:32:01 1997 PDT
449 | Mon Feb 10 17:32:01 1997 PST
450 | Tue Feb 11 17:32:01 1997 PST
451 | Wed Feb 12 17:32:01 1997 PST
452 | Thu Feb 13 17:32:01 1997 PST
453 | Fri Feb 14 17:32:01 1997 PST
454 | Sat Feb 15 17:32:01 1997 PST
455 | Sun Feb 16 17:32:01 1997 PST
456 | Tue Feb 16 17:32:01 0097 PST BC
457 | Sat Feb 16 17:32:01 0097 PST
458 | Thu Feb 16 17:32:01 0597 PST
459 | Tue Feb 16 17:32:01 1097 PST
460 | Sat Feb 16 17:32:01 1697 PST
461 | Thu Feb 16 17:32:01 1797 PST
462 | Tue Feb 16 17:32:01 1897 PST
463 | Sun Feb 16 17:32:01 1997 PST
464 | Sat Feb 16 17:32:01 2097 PST
465 | Wed Feb 28 17:32:01 1996 PST
466 | Thu Feb 29 17:32:01 1996 PST
467 | Fri Mar 01 17:32:01 1996 PST
468 | Mon Dec 30 17:32:01 1996 PST
469 | Tue Dec 31 17:32:01 1996 PST
470 | Wed Jan 01 17:32:01 1997 PST
471 | Fri Feb 28 17:32:01 1997 PST
472 | Sat Mar 01 17:32:01 1997 PST
473 | Tue Dec 30 17:32:01 1997 PST
474 | Wed Dec 31 17:32:01 1997 PST
475 | Fri Dec 31 17:32:01 1999 PST
476 | Sat Jan 01 17:32:01 2000 PST
477 | Sun Dec 31 17:32:01 2000 PST
478 | Mon Jan 01 17:32:01 2001 PST
481 SELECT '' AS "16", d1 FROM TIMESTAMPTZ_TBL
482 WHERE d1 <= timestamp with time zone '1997-01-02';
484 ----+---------------------------------
486 | Wed Dec 31 16:00:00 1969 PST
487 | Thu Jan 02 00:00:00 1997 PST
488 | Tue Feb 16 17:32:01 0097 PST BC
489 | Sat Feb 16 17:32:01 0097 PST
490 | Thu Feb 16 17:32:01 0597 PST
491 | Tue Feb 16 17:32:01 1097 PST
492 | Sat Feb 16 17:32:01 1697 PST
493 | Thu Feb 16 17:32:01 1797 PST
494 | Tue Feb 16 17:32:01 1897 PST
495 | Wed Feb 28 17:32:01 1996 PST
496 | Thu Feb 29 17:32:01 1996 PST
497 | Fri Mar 01 17:32:01 1996 PST
498 | Mon Dec 30 17:32:01 1996 PST
499 | Tue Dec 31 17:32:01 1996 PST
500 | Wed Jan 01 17:32:01 1997 PST
503 SELECT '' AS "49", d1 FROM TIMESTAMPTZ_TBL
504 WHERE d1 >= timestamp with time zone '1997-01-02';
506 ----+--------------------------------
508 | Mon Feb 10 17:32:01 1997 PST
509 | Mon Feb 10 17:32:01 1997 PST
510 | Mon Feb 10 17:32:02 1997 PST
511 | Mon Feb 10 17:32:01.4 1997 PST
512 | Mon Feb 10 17:32:01.5 1997 PST
513 | Mon Feb 10 17:32:01.6 1997 PST
514 | Thu Jan 02 00:00:00 1997 PST
515 | Thu Jan 02 03:04:05 1997 PST
516 | Mon Feb 10 17:32:01 1997 PST
517 | Mon Feb 10 17:32:01 1997 PST
518 | Mon Feb 10 17:32:01 1997 PST
519 | Mon Feb 10 17:32:01 1997 PST
520 | Tue Jun 10 17:32:01 1997 PDT
521 | Sat Sep 22 18:19:20 2001 PDT
522 | Wed Mar 15 08:14:01 2000 PST
523 | Wed Mar 15 04:14:02 2000 PST
524 | Wed Mar 15 02:14:03 2000 PST
525 | Wed Mar 15 03:14:04 2000 PST
526 | Wed Mar 15 01:14:05 2000 PST
527 | Mon Feb 10 17:32:01 1997 PST
528 | Mon Feb 10 17:32:01 1997 PST
529 | Mon Feb 10 17:32:00 1997 PST
530 | Mon Feb 10 17:32:01 1997 PST
531 | Mon Feb 10 17:32:01 1997 PST
532 | Mon Feb 10 17:32:01 1997 PST
533 | Mon Feb 10 17:32:01 1997 PST
534 | Mon Feb 10 17:32:01 1997 PST
535 | Mon Feb 10 09:32:01 1997 PST
536 | Mon Feb 10 09:32:01 1997 PST
537 | Mon Feb 10 09:32:01 1997 PST
538 | Mon Feb 10 14:32:01 1997 PST
539 | Thu Jul 10 14:32:01 1997 PDT
540 | Tue Jun 10 18:32:01 1997 PDT
541 | Mon Feb 10 17:32:01 1997 PST
542 | Tue Feb 11 17:32:01 1997 PST
543 | Wed Feb 12 17:32:01 1997 PST
544 | Thu Feb 13 17:32:01 1997 PST
545 | Fri Feb 14 17:32:01 1997 PST
546 | Sat Feb 15 17:32:01 1997 PST
547 | Sun Feb 16 17:32:01 1997 PST
548 | Sun Feb 16 17:32:01 1997 PST
549 | Sat Feb 16 17:32:01 2097 PST
550 | Fri Feb 28 17:32:01 1997 PST
551 | Sat Mar 01 17:32:01 1997 PST
552 | Tue Dec 30 17:32:01 1997 PST
553 | Wed Dec 31 17:32:01 1997 PST
554 | Fri Dec 31 17:32:01 1999 PST
555 | Sat Jan 01 17:32:01 2000 PST
556 | Sun Dec 31 17:32:01 2000 PST
557 | Mon Jan 01 17:32:01 2001 PST
560 SELECT '' AS "54", d1 - timestamp with time zone '1997-01-02' AS diff
561 FROM TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
563 ----+----------------------------------------
564 | @ 9863 days 8 hours ago
565 | @ 39 days 17 hours 32 mins 1 sec
566 | @ 39 days 17 hours 32 mins 1 sec
567 | @ 39 days 17 hours 32 mins 2 secs
568 | @ 39 days 17 hours 32 mins 1.4 secs
569 | @ 39 days 17 hours 32 mins 1.5 secs
570 | @ 39 days 17 hours 32 mins 1.6 secs
572 | @ 3 hours 4 mins 5 secs
573 | @ 39 days 17 hours 32 mins 1 sec
574 | @ 39 days 17 hours 32 mins 1 sec
575 | @ 39 days 17 hours 32 mins 1 sec
576 | @ 39 days 17 hours 32 mins 1 sec
577 | @ 159 days 16 hours 32 mins 1 sec
578 | @ 1724 days 17 hours 19 mins 20 secs
579 | @ 1168 days 8 hours 14 mins 1 sec
580 | @ 1168 days 4 hours 14 mins 2 secs
581 | @ 1168 days 2 hours 14 mins 3 secs
582 | @ 1168 days 3 hours 14 mins 4 secs
583 | @ 1168 days 1 hour 14 mins 5 secs
584 | @ 39 days 17 hours 32 mins 1 sec
585 | @ 39 days 17 hours 32 mins 1 sec
586 | @ 39 days 17 hours 32 mins
587 | @ 39 days 17 hours 32 mins 1 sec
588 | @ 39 days 17 hours 32 mins 1 sec
589 | @ 39 days 17 hours 32 mins 1 sec
590 | @ 39 days 17 hours 32 mins 1 sec
591 | @ 39 days 17 hours 32 mins 1 sec
592 | @ 39 days 9 hours 32 mins 1 sec
593 | @ 39 days 9 hours 32 mins 1 sec
594 | @ 39 days 9 hours 32 mins 1 sec
595 | @ 39 days 14 hours 32 mins 1 sec
596 | @ 189 days 13 hours 32 mins 1 sec
597 | @ 159 days 17 hours 32 mins 1 sec
598 | @ 39 days 17 hours 32 mins 1 sec
599 | @ 40 days 17 hours 32 mins 1 sec
600 | @ 41 days 17 hours 32 mins 1 sec
601 | @ 42 days 17 hours 32 mins 1 sec
602 | @ 43 days 17 hours 32 mins 1 sec
603 | @ 44 days 17 hours 32 mins 1 sec
604 | @ 45 days 17 hours 32 mins 1 sec
605 | @ 45 days 17 hours 32 mins 1 sec
606 | @ 308 days 6 hours 27 mins 59 secs ago
607 | @ 307 days 6 hours 27 mins 59 secs ago
608 | @ 306 days 6 hours 27 mins 59 secs ago
609 | @ 2 days 6 hours 27 mins 59 secs ago
610 | @ 1 day 6 hours 27 mins 59 secs ago
611 | @ 6 hours 27 mins 59 secs ago
612 | @ 57 days 17 hours 32 mins 1 sec
613 | @ 58 days 17 hours 32 mins 1 sec
614 | @ 362 days 17 hours 32 mins 1 sec
615 | @ 363 days 17 hours 32 mins 1 sec
616 | @ 1093 days 17 hours 32 mins 1 sec
617 | @ 1094 days 17 hours 32 mins 1 sec
618 | @ 1459 days 17 hours 32 mins 1 sec
619 | @ 1460 days 17 hours 32 mins 1 sec
622 SELECT '' AS date_trunc_week, date_trunc( 'week', timestamp with time zone '2004-02-29 15:44:17.71393' ) AS week_trunc;
623 date_trunc_week | week_trunc
624 -----------------+------------------------------
625 | Mon Feb 23 00:00:00 2004 PST
628 -- Test casting within a BETWEEN qualifier
629 SELECT '' AS "54", d1 - timestamp with time zone '1997-01-02' AS diff
631 WHERE d1 BETWEEN timestamp with time zone '1902-01-01' AND timestamp with time zone '2038-01-01';
633 ----+----------------------------------------
634 | @ 9863 days 8 hours ago
635 | @ 39 days 17 hours 32 mins 1 sec
636 | @ 39 days 17 hours 32 mins 1 sec
637 | @ 39 days 17 hours 32 mins 2 secs
638 | @ 39 days 17 hours 32 mins 1.4 secs
639 | @ 39 days 17 hours 32 mins 1.5 secs
640 | @ 39 days 17 hours 32 mins 1.6 secs
642 | @ 3 hours 4 mins 5 secs
643 | @ 39 days 17 hours 32 mins 1 sec
644 | @ 39 days 17 hours 32 mins 1 sec
645 | @ 39 days 17 hours 32 mins 1 sec
646 | @ 39 days 17 hours 32 mins 1 sec
647 | @ 159 days 16 hours 32 mins 1 sec
648 | @ 1724 days 17 hours 19 mins 20 secs
649 | @ 1168 days 8 hours 14 mins 1 sec
650 | @ 1168 days 4 hours 14 mins 2 secs
651 | @ 1168 days 2 hours 14 mins 3 secs
652 | @ 1168 days 3 hours 14 mins 4 secs
653 | @ 1168 days 1 hour 14 mins 5 secs
654 | @ 39 days 17 hours 32 mins 1 sec
655 | @ 39 days 17 hours 32 mins 1 sec
656 | @ 39 days 17 hours 32 mins
657 | @ 39 days 17 hours 32 mins 1 sec
658 | @ 39 days 17 hours 32 mins 1 sec
659 | @ 39 days 17 hours 32 mins 1 sec
660 | @ 39 days 17 hours 32 mins 1 sec
661 | @ 39 days 17 hours 32 mins 1 sec
662 | @ 39 days 9 hours 32 mins 1 sec
663 | @ 39 days 9 hours 32 mins 1 sec
664 | @ 39 days 9 hours 32 mins 1 sec
665 | @ 39 days 14 hours 32 mins 1 sec
666 | @ 189 days 13 hours 32 mins 1 sec
667 | @ 159 days 17 hours 32 mins 1 sec
668 | @ 39 days 17 hours 32 mins 1 sec
669 | @ 40 days 17 hours 32 mins 1 sec
670 | @ 41 days 17 hours 32 mins 1 sec
671 | @ 42 days 17 hours 32 mins 1 sec
672 | @ 43 days 17 hours 32 mins 1 sec
673 | @ 44 days 17 hours 32 mins 1 sec
674 | @ 45 days 17 hours 32 mins 1 sec
675 | @ 45 days 17 hours 32 mins 1 sec
676 | @ 308 days 6 hours 27 mins 59 secs ago
677 | @ 307 days 6 hours 27 mins 59 secs ago
678 | @ 306 days 6 hours 27 mins 59 secs ago
679 | @ 2 days 6 hours 27 mins 59 secs ago
680 | @ 1 day 6 hours 27 mins 59 secs ago
681 | @ 6 hours 27 mins 59 secs ago
682 | @ 57 days 17 hours 32 mins 1 sec
683 | @ 58 days 17 hours 32 mins 1 sec
684 | @ 362 days 17 hours 32 mins 1 sec
685 | @ 363 days 17 hours 32 mins 1 sec
686 | @ 1093 days 17 hours 32 mins 1 sec
687 | @ 1094 days 17 hours 32 mins 1 sec
688 | @ 1459 days 17 hours 32 mins 1 sec
689 | @ 1460 days 17 hours 32 mins 1 sec
692 SELECT '' AS "54", d1 as timestamptz,
693 date_part( 'year', d1) AS year, date_part( 'month', d1) AS month,
694 date_part( 'day', d1) AS day, date_part( 'hour', d1) AS hour,
695 date_part( 'minute', d1) AS minute, date_part( 'second', d1) AS second
696 FROM TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
697 54 | timestamptz | year | month | day | hour | minute | second
698 ----+--------------------------------+------+-------+-----+------+--------+--------
699 | Wed Dec 31 16:00:00 1969 PST | 1969 | 12 | 31 | 16 | 0 | 0
700 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
701 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
702 | Mon Feb 10 17:32:02 1997 PST | 1997 | 2 | 10 | 17 | 32 | 2
703 | Mon Feb 10 17:32:01.4 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1.4
704 | Mon Feb 10 17:32:01.5 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1.5
705 | Mon Feb 10 17:32:01.6 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1.6
706 | Thu Jan 02 00:00:00 1997 PST | 1997 | 1 | 2 | 0 | 0 | 0
707 | Thu Jan 02 03:04:05 1997 PST | 1997 | 1 | 2 | 3 | 4 | 5
708 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
709 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
710 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
711 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
712 | Tue Jun 10 17:32:01 1997 PDT | 1997 | 6 | 10 | 17 | 32 | 1
713 | Sat Sep 22 18:19:20 2001 PDT | 2001 | 9 | 22 | 18 | 19 | 20
714 | Wed Mar 15 08:14:01 2000 PST | 2000 | 3 | 15 | 8 | 14 | 1
715 | Wed Mar 15 04:14:02 2000 PST | 2000 | 3 | 15 | 4 | 14 | 2
716 | Wed Mar 15 02:14:03 2000 PST | 2000 | 3 | 15 | 2 | 14 | 3
717 | Wed Mar 15 03:14:04 2000 PST | 2000 | 3 | 15 | 3 | 14 | 4
718 | Wed Mar 15 01:14:05 2000 PST | 2000 | 3 | 15 | 1 | 14 | 5
719 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
720 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
721 | Mon Feb 10 17:32:00 1997 PST | 1997 | 2 | 10 | 17 | 32 | 0
722 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
723 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
724 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
725 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
726 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
727 | Mon Feb 10 09:32:01 1997 PST | 1997 | 2 | 10 | 9 | 32 | 1
728 | Mon Feb 10 09:32:01 1997 PST | 1997 | 2 | 10 | 9 | 32 | 1
729 | Mon Feb 10 09:32:01 1997 PST | 1997 | 2 | 10 | 9 | 32 | 1
730 | Mon Feb 10 14:32:01 1997 PST | 1997 | 2 | 10 | 14 | 32 | 1
731 | Thu Jul 10 14:32:01 1997 PDT | 1997 | 7 | 10 | 14 | 32 | 1
732 | Tue Jun 10 18:32:01 1997 PDT | 1997 | 6 | 10 | 18 | 32 | 1
733 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
734 | Tue Feb 11 17:32:01 1997 PST | 1997 | 2 | 11 | 17 | 32 | 1
735 | Wed Feb 12 17:32:01 1997 PST | 1997 | 2 | 12 | 17 | 32 | 1
736 | Thu Feb 13 17:32:01 1997 PST | 1997 | 2 | 13 | 17 | 32 | 1
737 | Fri Feb 14 17:32:01 1997 PST | 1997 | 2 | 14 | 17 | 32 | 1
738 | Sat Feb 15 17:32:01 1997 PST | 1997 | 2 | 15 | 17 | 32 | 1
739 | Sun Feb 16 17:32:01 1997 PST | 1997 | 2 | 16 | 17 | 32 | 1
740 | Sun Feb 16 17:32:01 1997 PST | 1997 | 2 | 16 | 17 | 32 | 1
741 | Wed Feb 28 17:32:01 1996 PST | 1996 | 2 | 28 | 17 | 32 | 1
742 | Thu Feb 29 17:32:01 1996 PST | 1996 | 2 | 29 | 17 | 32 | 1
743 | Fri Mar 01 17:32:01 1996 PST | 1996 | 3 | 1 | 17 | 32 | 1
744 | Mon Dec 30 17:32:01 1996 PST | 1996 | 12 | 30 | 17 | 32 | 1
745 | Tue Dec 31 17:32:01 1996 PST | 1996 | 12 | 31 | 17 | 32 | 1
746 | Wed Jan 01 17:32:01 1997 PST | 1997 | 1 | 1 | 17 | 32 | 1
747 | Fri Feb 28 17:32:01 1997 PST | 1997 | 2 | 28 | 17 | 32 | 1
748 | Sat Mar 01 17:32:01 1997 PST | 1997 | 3 | 1 | 17 | 32 | 1
749 | Tue Dec 30 17:32:01 1997 PST | 1997 | 12 | 30 | 17 | 32 | 1
750 | Wed Dec 31 17:32:01 1997 PST | 1997 | 12 | 31 | 17 | 32 | 1
751 | Fri Dec 31 17:32:01 1999 PST | 1999 | 12 | 31 | 17 | 32 | 1
752 | Sat Jan 01 17:32:01 2000 PST | 2000 | 1 | 1 | 17 | 32 | 1
753 | Sun Dec 31 17:32:01 2000 PST | 2000 | 12 | 31 | 17 | 32 | 1
754 | Mon Jan 01 17:32:01 2001 PST | 2001 | 1 | 1 | 17 | 32 | 1
757 SELECT '' AS "54", d1 as timestamptz,
758 date_part( 'quarter', d1) AS quarter, date_part( 'msec', d1) AS msec,
759 date_part( 'usec', d1) AS usec
760 FROM TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
761 54 | timestamptz | quarter | msec | usec
762 ----+--------------------------------+---------+-------+----------
763 | Wed Dec 31 16:00:00 1969 PST | 4 | 0 | 0
764 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
765 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
766 | Mon Feb 10 17:32:02 1997 PST | 1 | 2000 | 2000000
767 | Mon Feb 10 17:32:01.4 1997 PST | 1 | 1400 | 1400000
768 | Mon Feb 10 17:32:01.5 1997 PST | 1 | 1500 | 1500000
769 | Mon Feb 10 17:32:01.6 1997 PST | 1 | 1600 | 1600000
770 | Thu Jan 02 00:00:00 1997 PST | 1 | 0 | 0
771 | Thu Jan 02 03:04:05 1997 PST | 1 | 5000 | 5000000
772 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
773 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
774 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
775 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
776 | Tue Jun 10 17:32:01 1997 PDT | 2 | 1000 | 1000000
777 | Sat Sep 22 18:19:20 2001 PDT | 3 | 20000 | 20000000
778 | Wed Mar 15 08:14:01 2000 PST | 1 | 1000 | 1000000
779 | Wed Mar 15 04:14:02 2000 PST | 1 | 2000 | 2000000
780 | Wed Mar 15 02:14:03 2000 PST | 1 | 3000 | 3000000
781 | Wed Mar 15 03:14:04 2000 PST | 1 | 4000 | 4000000
782 | Wed Mar 15 01:14:05 2000 PST | 1 | 5000 | 5000000
783 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
784 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
785 | Mon Feb 10 17:32:00 1997 PST | 1 | 0 | 0
786 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
787 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
788 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
789 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
790 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
791 | Mon Feb 10 09:32:01 1997 PST | 1 | 1000 | 1000000
792 | Mon Feb 10 09:32:01 1997 PST | 1 | 1000 | 1000000
793 | Mon Feb 10 09:32:01 1997 PST | 1 | 1000 | 1000000
794 | Mon Feb 10 14:32:01 1997 PST | 1 | 1000 | 1000000
795 | Thu Jul 10 14:32:01 1997 PDT | 3 | 1000 | 1000000
796 | Tue Jun 10 18:32:01 1997 PDT | 2 | 1000 | 1000000
797 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
798 | Tue Feb 11 17:32:01 1997 PST | 1 | 1000 | 1000000
799 | Wed Feb 12 17:32:01 1997 PST | 1 | 1000 | 1000000
800 | Thu Feb 13 17:32:01 1997 PST | 1 | 1000 | 1000000
801 | Fri Feb 14 17:32:01 1997 PST | 1 | 1000 | 1000000
802 | Sat Feb 15 17:32:01 1997 PST | 1 | 1000 | 1000000
803 | Sun Feb 16 17:32:01 1997 PST | 1 | 1000 | 1000000
804 | Sun Feb 16 17:32:01 1997 PST | 1 | 1000 | 1000000
805 | Wed Feb 28 17:32:01 1996 PST | 1 | 1000 | 1000000
806 | Thu Feb 29 17:32:01 1996 PST | 1 | 1000 | 1000000
807 | Fri Mar 01 17:32:01 1996 PST | 1 | 1000 | 1000000
808 | Mon Dec 30 17:32:01 1996 PST | 4 | 1000 | 1000000
809 | Tue Dec 31 17:32:01 1996 PST | 4 | 1000 | 1000000
810 | Wed Jan 01 17:32:01 1997 PST | 1 | 1000 | 1000000
811 | Fri Feb 28 17:32:01 1997 PST | 1 | 1000 | 1000000
812 | Sat Mar 01 17:32:01 1997 PST | 1 | 1000 | 1000000
813 | Tue Dec 30 17:32:01 1997 PST | 4 | 1000 | 1000000
814 | Wed Dec 31 17:32:01 1997 PST | 4 | 1000 | 1000000
815 | Fri Dec 31 17:32:01 1999 PST | 4 | 1000 | 1000000
816 | Sat Jan 01 17:32:01 2000 PST | 1 | 1000 | 1000000
817 | Sun Dec 31 17:32:01 2000 PST | 4 | 1000 | 1000000
818 | Mon Jan 01 17:32:01 2001 PST | 1 | 1000 | 1000000
821 SELECT '' AS "54", d1 as timestamptz,
822 date_part( 'isoyear', d1) AS isoyear, date_part( 'week', d1) AS week,
823 date_part( 'dow', d1) AS dow
824 FROM TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
825 54 | timestamptz | isoyear | week | dow
826 ----+--------------------------------+---------+------+-----
827 | Wed Dec 31 16:00:00 1969 PST | 1970 | 1 | 3
828 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
829 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
830 | Mon Feb 10 17:32:02 1997 PST | 1997 | 7 | 1
831 | Mon Feb 10 17:32:01.4 1997 PST | 1997 | 7 | 1
832 | Mon Feb 10 17:32:01.5 1997 PST | 1997 | 7 | 1
833 | Mon Feb 10 17:32:01.6 1997 PST | 1997 | 7 | 1
834 | Thu Jan 02 00:00:00 1997 PST | 1997 | 1 | 4
835 | Thu Jan 02 03:04:05 1997 PST | 1997 | 1 | 4
836 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
837 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
838 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
839 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
840 | Tue Jun 10 17:32:01 1997 PDT | 1997 | 24 | 2
841 | Sat Sep 22 18:19:20 2001 PDT | 2001 | 38 | 6
842 | Wed Mar 15 08:14:01 2000 PST | 2000 | 11 | 3
843 | Wed Mar 15 04:14:02 2000 PST | 2000 | 11 | 3
844 | Wed Mar 15 02:14:03 2000 PST | 2000 | 11 | 3
845 | Wed Mar 15 03:14:04 2000 PST | 2000 | 11 | 3
846 | Wed Mar 15 01:14:05 2000 PST | 2000 | 11 | 3
847 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
848 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
849 | Mon Feb 10 17:32:00 1997 PST | 1997 | 7 | 1
850 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
851 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
852 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
853 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
854 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
855 | Mon Feb 10 09:32:01 1997 PST | 1997 | 7 | 1
856 | Mon Feb 10 09:32:01 1997 PST | 1997 | 7 | 1
857 | Mon Feb 10 09:32:01 1997 PST | 1997 | 7 | 1
858 | Mon Feb 10 14:32:01 1997 PST | 1997 | 7 | 1
859 | Thu Jul 10 14:32:01 1997 PDT | 1997 | 28 | 4
860 | Tue Jun 10 18:32:01 1997 PDT | 1997 | 24 | 2
861 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
862 | Tue Feb 11 17:32:01 1997 PST | 1997 | 7 | 2
863 | Wed Feb 12 17:32:01 1997 PST | 1997 | 7 | 3
864 | Thu Feb 13 17:32:01 1997 PST | 1997 | 7 | 4
865 | Fri Feb 14 17:32:01 1997 PST | 1997 | 7 | 5
866 | Sat Feb 15 17:32:01 1997 PST | 1997 | 7 | 6
867 | Sun Feb 16 17:32:01 1997 PST | 1997 | 7 | 0
868 | Sun Feb 16 17:32:01 1997 PST | 1997 | 7 | 0
869 | Wed Feb 28 17:32:01 1996 PST | 1996 | 9 | 3
870 | Thu Feb 29 17:32:01 1996 PST | 1996 | 9 | 4
871 | Fri Mar 01 17:32:01 1996 PST | 1996 | 9 | 5
872 | Mon Dec 30 17:32:01 1996 PST | 1997 | 1 | 1
873 | Tue Dec 31 17:32:01 1996 PST | 1997 | 1 | 2
874 | Wed Jan 01 17:32:01 1997 PST | 1997 | 1 | 3
875 | Fri Feb 28 17:32:01 1997 PST | 1997 | 9 | 5
876 | Sat Mar 01 17:32:01 1997 PST | 1997 | 9 | 6
877 | Tue Dec 30 17:32:01 1997 PST | 1998 | 1 | 2
878 | Wed Dec 31 17:32:01 1997 PST | 1998 | 1 | 3
879 | Fri Dec 31 17:32:01 1999 PST | 1999 | 52 | 5
880 | Sat Jan 01 17:32:01 2000 PST | 1999 | 52 | 6
881 | Sun Dec 31 17:32:01 2000 PST | 2000 | 52 | 0
882 | Mon Jan 01 17:32:01 2001 PST | 2001 | 1 | 1
886 SELECT '' AS to_char_1, to_char(d1, 'DAY Day day DY Dy dy MONTH Month month RM MON Mon mon')
887 FROM TIMESTAMPTZ_TBL;
889 -----------+------------------------------------------------------------------------------------------
892 | WEDNESDAY Wednesday wednesday WED Wed wed DECEMBER December december XII DEC Dec dec
893 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
894 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
895 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
896 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
897 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
898 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
899 | THURSDAY Thursday thursday THU Thu thu JANUARY January january I JAN Jan jan
900 | THURSDAY Thursday thursday THU Thu thu JANUARY January january I JAN Jan jan
901 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
902 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
903 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
904 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
905 | TUESDAY Tuesday tuesday TUE Tue tue JUNE June june VI JUN Jun jun
906 | SATURDAY Saturday saturday SAT Sat sat SEPTEMBER September september IX SEP Sep sep
907 | WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar
908 | WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar
909 | WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar
910 | WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar
911 | WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar
912 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
913 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
914 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
915 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
916 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
917 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
918 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
919 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
920 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
921 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
922 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
923 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
924 | THURSDAY Thursday thursday THU Thu thu JULY July july VII JUL Jul jul
925 | TUESDAY Tuesday tuesday TUE Tue tue JUNE June june VI JUN Jun jun
926 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
927 | TUESDAY Tuesday tuesday TUE Tue tue FEBRUARY February february II FEB Feb feb
928 | WEDNESDAY Wednesday wednesday WED Wed wed FEBRUARY February february II FEB Feb feb
929 | THURSDAY Thursday thursday THU Thu thu FEBRUARY February february II FEB Feb feb
930 | FRIDAY Friday friday FRI Fri fri FEBRUARY February february II FEB Feb feb
931 | SATURDAY Saturday saturday SAT Sat sat FEBRUARY February february II FEB Feb feb
932 | SUNDAY Sunday sunday SUN Sun sun FEBRUARY February february II FEB Feb feb
933 | TUESDAY Tuesday tuesday TUE Tue tue FEBRUARY February february II FEB Feb feb
934 | SATURDAY Saturday saturday SAT Sat sat FEBRUARY February february II FEB Feb feb
935 | THURSDAY Thursday thursday THU Thu thu FEBRUARY February february II FEB Feb feb
936 | TUESDAY Tuesday tuesday TUE Tue tue FEBRUARY February february II FEB Feb feb
937 | SATURDAY Saturday saturday SAT Sat sat FEBRUARY February february II FEB Feb feb
938 | THURSDAY Thursday thursday THU Thu thu FEBRUARY February february II FEB Feb feb
939 | TUESDAY Tuesday tuesday TUE Tue tue FEBRUARY February february II FEB Feb feb
940 | SUNDAY Sunday sunday SUN Sun sun FEBRUARY February february II FEB Feb feb
941 | SATURDAY Saturday saturday SAT Sat sat FEBRUARY February february II FEB Feb feb
942 | WEDNESDAY Wednesday wednesday WED Wed wed FEBRUARY February february II FEB Feb feb
943 | THURSDAY Thursday thursday THU Thu thu FEBRUARY February february II FEB Feb feb
944 | FRIDAY Friday friday FRI Fri fri MARCH March march III MAR Mar mar
945 | MONDAY Monday monday MON Mon mon DECEMBER December december XII DEC Dec dec
946 | TUESDAY Tuesday tuesday TUE Tue tue DECEMBER December december XII DEC Dec dec
947 | WEDNESDAY Wednesday wednesday WED Wed wed JANUARY January january I JAN Jan jan
948 | FRIDAY Friday friday FRI Fri fri FEBRUARY February february II FEB Feb feb
949 | SATURDAY Saturday saturday SAT Sat sat MARCH March march III MAR Mar mar
950 | TUESDAY Tuesday tuesday TUE Tue tue DECEMBER December december XII DEC Dec dec
951 | WEDNESDAY Wednesday wednesday WED Wed wed DECEMBER December december XII DEC Dec dec
952 | FRIDAY Friday friday FRI Fri fri DECEMBER December december XII DEC Dec dec
953 | SATURDAY Saturday saturday SAT Sat sat JANUARY January january I JAN Jan jan
954 | SUNDAY Sunday sunday SUN Sun sun DECEMBER December december XII DEC Dec dec
955 | MONDAY Monday monday MON Mon mon JANUARY January january I JAN Jan jan
959 SELECT '' AS to_char_2, to_char(d1, 'FMDAY FMDay FMday FMMONTH FMMonth FMmonth FMRM')
960 FROM TIMESTAMPTZ_TBL;
962 -----------+--------------------------------------------------------------
965 | WEDNESDAY Wednesday wednesday DECEMBER December december XII
966 | MONDAY Monday monday FEBRUARY February february II
967 | MONDAY Monday monday FEBRUARY February february II
968 | MONDAY Monday monday FEBRUARY February february II
969 | MONDAY Monday monday FEBRUARY February february II
970 | MONDAY Monday monday FEBRUARY February february II
971 | MONDAY Monday monday FEBRUARY February february II
972 | THURSDAY Thursday thursday JANUARY January january I
973 | THURSDAY Thursday thursday JANUARY January january I
974 | MONDAY Monday monday FEBRUARY February february II
975 | MONDAY Monday monday FEBRUARY February february II
976 | MONDAY Monday monday FEBRUARY February february II
977 | MONDAY Monday monday FEBRUARY February february II
978 | TUESDAY Tuesday tuesday JUNE June june VI
979 | SATURDAY Saturday saturday SEPTEMBER September september IX
980 | WEDNESDAY Wednesday wednesday MARCH March march III
981 | WEDNESDAY Wednesday wednesday MARCH March march III
982 | WEDNESDAY Wednesday wednesday MARCH March march III
983 | WEDNESDAY Wednesday wednesday MARCH March march III
984 | WEDNESDAY Wednesday wednesday MARCH March march III
985 | MONDAY Monday monday FEBRUARY February february II
986 | MONDAY Monday monday FEBRUARY February february II
987 | MONDAY Monday monday FEBRUARY February february II
988 | MONDAY Monday monday FEBRUARY February february II
989 | MONDAY Monday monday FEBRUARY February february II
990 | MONDAY Monday monday FEBRUARY February february II
991 | MONDAY Monday monday FEBRUARY February february II
992 | MONDAY Monday monday FEBRUARY February february II
993 | MONDAY Monday monday FEBRUARY February february II
994 | MONDAY Monday monday FEBRUARY February february II
995 | MONDAY Monday monday FEBRUARY February february II
996 | MONDAY Monday monday FEBRUARY February february II
997 | THURSDAY Thursday thursday JULY July july VII
998 | TUESDAY Tuesday tuesday JUNE June june VI
999 | MONDAY Monday monday FEBRUARY February february II
1000 | TUESDAY Tuesday tuesday FEBRUARY February february II
1001 | WEDNESDAY Wednesday wednesday FEBRUARY February february II
1002 | THURSDAY Thursday thursday FEBRUARY February february II
1003 | FRIDAY Friday friday FEBRUARY February february II
1004 | SATURDAY Saturday saturday FEBRUARY February february II
1005 | SUNDAY Sunday sunday FEBRUARY February february II
1006 | TUESDAY Tuesday tuesday FEBRUARY February february II
1007 | SATURDAY Saturday saturday FEBRUARY February february II
1008 | THURSDAY Thursday thursday FEBRUARY February february II
1009 | TUESDAY Tuesday tuesday FEBRUARY February february II
1010 | SATURDAY Saturday saturday FEBRUARY February february II
1011 | THURSDAY Thursday thursday FEBRUARY February february II
1012 | TUESDAY Tuesday tuesday FEBRUARY February february II
1013 | SUNDAY Sunday sunday FEBRUARY February february II
1014 | SATURDAY Saturday saturday FEBRUARY February february II
1015 | WEDNESDAY Wednesday wednesday FEBRUARY February february II
1016 | THURSDAY Thursday thursday FEBRUARY February february II
1017 | FRIDAY Friday friday MARCH March march III
1018 | MONDAY Monday monday DECEMBER December december XII
1019 | TUESDAY Tuesday tuesday DECEMBER December december XII
1020 | WEDNESDAY Wednesday wednesday JANUARY January january I
1021 | FRIDAY Friday friday FEBRUARY February february II
1022 | SATURDAY Saturday saturday MARCH March march III
1023 | TUESDAY Tuesday tuesday DECEMBER December december XII
1024 | WEDNESDAY Wednesday wednesday DECEMBER December december XII
1025 | FRIDAY Friday friday DECEMBER December december XII
1026 | SATURDAY Saturday saturday JANUARY January january I
1027 | SUNDAY Sunday sunday DECEMBER December december XII
1028 | MONDAY Monday monday JANUARY January january I
1031 SELECT '' AS to_char_3, to_char(d1, 'Y,YYY YYYY YYY YY Y CC Q MM WW DDD DD D J')
1032 FROM TIMESTAMPTZ_TBL;
1034 -----------+-------------------------------------------------
1037 | 1,969 1969 969 69 9 20 4 12 53 365 31 4 2440587
1038 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1039 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1040 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1041 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1042 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1043 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1044 | 1,997 1997 997 97 7 20 1 01 01 002 02 5 2450451
1045 | 1,997 1997 997 97 7 20 1 01 01 002 02 5 2450451
1046 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1047 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1048 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1049 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1050 | 1,997 1997 997 97 7 20 2 06 23 161 10 3 2450610
1051 | 2,001 2001 001 01 1 21 3 09 38 265 22 7 2452175
1052 | 2,000 2000 000 00 0 20 1 03 11 075 15 4 2451619
1053 | 2,000 2000 000 00 0 20 1 03 11 075 15 4 2451619
1054 | 2,000 2000 000 00 0 20 1 03 11 075 15 4 2451619
1055 | 2,000 2000 000 00 0 20 1 03 11 075 15 4 2451619
1056 | 2,000 2000 000 00 0 20 1 03 11 075 15 4 2451619
1057 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1058 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1059 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1060 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1061 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1062 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1063 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1064 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1065 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1066 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1067 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1068 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1069 | 1,997 1997 997 97 7 20 3 07 28 191 10 5 2450640
1070 | 1,997 1997 997 97 7 20 2 06 23 161 10 3 2450610
1071 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1072 | 1,997 1997 997 97 7 20 1 02 06 042 11 3 2450491
1073 | 1,997 1997 997 97 7 20 1 02 07 043 12 4 2450492
1074 | 1,997 1997 997 97 7 20 1 02 07 044 13 5 2450493
1075 | 1,997 1997 997 97 7 20 1 02 07 045 14 6 2450494
1076 | 1,997 1997 997 97 7 20 1 02 07 046 15 7 2450495
1077 | 1,997 1997 997 97 7 20 1 02 07 047 16 1 2450496
1078 | 0,097 0097 097 97 7 01 1 02 07 047 16 3 1686042
1079 | 0,097 0097 097 97 7 01 1 02 07 047 16 7 1756536
1080 | 0,597 0597 597 97 7 06 1 02 07 047 16 5 1939157
1081 | 1,097 1097 097 97 7 11 1 02 07 047 16 3 2121778
1082 | 1,697 1697 697 97 7 17 1 02 07 047 16 7 2340924
1083 | 1,797 1797 797 97 7 18 1 02 07 047 16 5 2377448
1084 | 1,897 1897 897 97 7 19 1 02 07 047 16 3 2413972
1085 | 1,997 1997 997 97 7 20 1 02 07 047 16 1 2450496
1086 | 2,097 2097 097 97 7 21 1 02 07 047 16 7 2487021
1087 | 1,996 1996 996 96 6 20 1 02 09 059 28 4 2450142
1088 | 1,996 1996 996 96 6 20 1 02 09 060 29 5 2450143
1089 | 1,996 1996 996 96 6 20 1 03 09 061 01 6 2450144
1090 | 1,996 1996 996 96 6 20 4 12 53 365 30 2 2450448
1091 | 1,996 1996 996 96 6 20 4 12 53 366 31 3 2450449
1092 | 1,997 1997 997 97 7 20 1 01 01 001 01 4 2450450
1093 | 1,997 1997 997 97 7 20 1 02 09 059 28 6 2450508
1094 | 1,997 1997 997 97 7 20 1 03 09 060 01 7 2450509
1095 | 1,997 1997 997 97 7 20 4 12 52 364 30 3 2450813
1096 | 1,997 1997 997 97 7 20 4 12 53 365 31 4 2450814
1097 | 1,999 1999 999 99 9 20 4 12 53 365 31 6 2451544
1098 | 2,000 2000 000 00 0 20 1 01 01 001 01 7 2451545
1099 | 2,000 2000 000 00 0 20 4 12 53 366 31 1 2451910
1100 | 2,001 2001 001 01 1 21 1 01 01 001 01 2 2451911
1104 SELECT '' AS to_char_4, to_char(d1, 'FMY,YYY FMYYYY FMYYY FMYY FMY FMCC FMQ FMMM FMWW FMDDD FMDD FMD FMJ')
1105 FROM TIMESTAMPTZ_TBL;
1107 -----------+-------------------------------------------------
1110 | 1,969 1969 969 69 9 20 4 12 53 365 31 4 2440587
1111 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1112 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1113 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1114 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1115 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1116 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1117 | 1,997 1997 997 97 7 20 1 1 1 2 2 5 2450451
1118 | 1,997 1997 997 97 7 20 1 1 1 2 2 5 2450451
1119 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1120 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1121 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1122 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1123 | 1,997 1997 997 97 7 20 2 6 23 161 10 3 2450610
1124 | 2,001 2001 001 01 1 21 3 9 38 265 22 7 2452175
1125 | 2,000 2000 000 00 0 20 1 3 11 75 15 4 2451619
1126 | 2,000 2000 000 00 0 20 1 3 11 75 15 4 2451619
1127 | 2,000 2000 000 00 0 20 1 3 11 75 15 4 2451619
1128 | 2,000 2000 000 00 0 20 1 3 11 75 15 4 2451619
1129 | 2,000 2000 000 00 0 20 1 3 11 75 15 4 2451619
1130 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1131 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1132 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1133 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1134 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1135 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1136 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1137 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1138 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1139 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1140 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1141 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1142 | 1,997 1997 997 97 7 20 3 7 28 191 10 5 2450640
1143 | 1,997 1997 997 97 7 20 2 6 23 161 10 3 2450610
1144 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1145 | 1,997 1997 997 97 7 20 1 2 6 42 11 3 2450491
1146 | 1,997 1997 997 97 7 20 1 2 7 43 12 4 2450492
1147 | 1,997 1997 997 97 7 20 1 2 7 44 13 5 2450493
1148 | 1,997 1997 997 97 7 20 1 2 7 45 14 6 2450494
1149 | 1,997 1997 997 97 7 20 1 2 7 46 15 7 2450495
1150 | 1,997 1997 997 97 7 20 1 2 7 47 16 1 2450496
1151 | 0,097 97 097 97 7 1 1 2 7 47 16 3 1686042
1152 | 0,097 97 097 97 7 1 1 2 7 47 16 7 1756536
1153 | 0,597 597 597 97 7 6 1 2 7 47 16 5 1939157
1154 | 1,097 1097 097 97 7 11 1 2 7 47 16 3 2121778
1155 | 1,697 1697 697 97 7 17 1 2 7 47 16 7 2340924
1156 | 1,797 1797 797 97 7 18 1 2 7 47 16 5 2377448
1157 | 1,897 1897 897 97 7 19 1 2 7 47 16 3 2413972
1158 | 1,997 1997 997 97 7 20 1 2 7 47 16 1 2450496
1159 | 2,097 2097 097 97 7 21 1 2 7 47 16 7 2487021
1160 | 1,996 1996 996 96 6 20 1 2 9 59 28 4 2450142
1161 | 1,996 1996 996 96 6 20 1 2 9 60 29 5 2450143
1162 | 1,996 1996 996 96 6 20 1 3 9 61 1 6 2450144
1163 | 1,996 1996 996 96 6 20 4 12 53 365 30 2 2450448
1164 | 1,996 1996 996 96 6 20 4 12 53 366 31 3 2450449
1165 | 1,997 1997 997 97 7 20 1 1 1 1 1 4 2450450
1166 | 1,997 1997 997 97 7 20 1 2 9 59 28 6 2450508
1167 | 1,997 1997 997 97 7 20 1 3 9 60 1 7 2450509
1168 | 1,997 1997 997 97 7 20 4 12 52 364 30 3 2450813
1169 | 1,997 1997 997 97 7 20 4 12 53 365 31 4 2450814
1170 | 1,999 1999 999 99 9 20 4 12 53 365 31 6 2451544
1171 | 2,000 2000 000 00 0 20 1 1 1 1 1 7 2451545
1172 | 2,000 2000 000 00 0 20 4 12 53 366 31 1 2451910
1173 | 2,001 2001 001 01 1 21 1 1 1 1 1 2 2451911
1177 SELECT '' AS to_char_5, to_char(d1, 'HH HH12 HH24 MI SS SSSS')
1178 FROM TIMESTAMPTZ_TBL;
1180 -----------+----------------------
1183 | 04 04 16 00 00 57600
1184 | 05 05 17 32 01 63121
1185 | 05 05 17 32 01 63121
1186 | 05 05 17 32 02 63122
1187 | 05 05 17 32 01 63121
1188 | 05 05 17 32 01 63121
1189 | 05 05 17 32 01 63121
1191 | 03 03 03 04 05 11045
1192 | 05 05 17 32 01 63121
1193 | 05 05 17 32 01 63121
1194 | 05 05 17 32 01 63121
1195 | 05 05 17 32 01 63121
1196 | 05 05 17 32 01 63121
1197 | 06 06 18 19 20 65960
1198 | 08 08 08 14 01 29641
1199 | 04 04 04 14 02 15242
1200 | 02 02 02 14 03 8043
1201 | 03 03 03 14 04 11644
1202 | 01 01 01 14 05 4445
1203 | 05 05 17 32 01 63121
1204 | 05 05 17 32 01 63121
1205 | 05 05 17 32 00 63120
1206 | 05 05 17 32 01 63121
1207 | 05 05 17 32 01 63121
1208 | 05 05 17 32 01 63121
1209 | 05 05 17 32 01 63121
1210 | 05 05 17 32 01 63121
1211 | 09 09 09 32 01 34321
1212 | 09 09 09 32 01 34321
1213 | 09 09 09 32 01 34321
1214 | 02 02 14 32 01 52321
1215 | 02 02 14 32 01 52321
1216 | 06 06 18 32 01 66721
1217 | 05 05 17 32 01 63121
1218 | 05 05 17 32 01 63121
1219 | 05 05 17 32 01 63121
1220 | 05 05 17 32 01 63121
1221 | 05 05 17 32 01 63121
1222 | 05 05 17 32 01 63121
1223 | 05 05 17 32 01 63121
1224 | 05 05 17 32 01 63121
1225 | 05 05 17 32 01 63121
1226 | 05 05 17 32 01 63121
1227 | 05 05 17 32 01 63121
1228 | 05 05 17 32 01 63121
1229 | 05 05 17 32 01 63121
1230 | 05 05 17 32 01 63121
1231 | 05 05 17 32 01 63121
1232 | 05 05 17 32 01 63121
1233 | 05 05 17 32 01 63121
1234 | 05 05 17 32 01 63121
1235 | 05 05 17 32 01 63121
1236 | 05 05 17 32 01 63121
1237 | 05 05 17 32 01 63121
1238 | 05 05 17 32 01 63121
1239 | 05 05 17 32 01 63121
1240 | 05 05 17 32 01 63121
1241 | 05 05 17 32 01 63121
1242 | 05 05 17 32 01 63121
1243 | 05 05 17 32 01 63121
1244 | 05 05 17 32 01 63121
1245 | 05 05 17 32 01 63121
1246 | 05 05 17 32 01 63121
1249 SELECT '' AS to_char_6, to_char(d1, E'"HH:MI:SS is" HH:MI:SS "\\"text between quote marks\\""')
1250 FROM TIMESTAMPTZ_TBL;
1252 -----------+-------------------------------------------------
1255 | HH:MI:SS is 04:00:00 "text between quote marks"
1256 | HH:MI:SS is 05:32:01 "text between quote marks"
1257 | HH:MI:SS is 05:32:01 "text between quote marks"
1258 | HH:MI:SS is 05:32:02 "text between quote marks"
1259 | HH:MI:SS is 05:32:01 "text between quote marks"
1260 | HH:MI:SS is 05:32:01 "text between quote marks"
1261 | HH:MI:SS is 05:32:01 "text between quote marks"
1262 | HH:MI:SS is 12:00:00 "text between quote marks"
1263 | HH:MI:SS is 03:04:05 "text between quote marks"
1264 | HH:MI:SS is 05:32:01 "text between quote marks"
1265 | HH:MI:SS is 05:32:01 "text between quote marks"
1266 | HH:MI:SS is 05:32:01 "text between quote marks"
1267 | HH:MI:SS is 05:32:01 "text between quote marks"
1268 | HH:MI:SS is 05:32:01 "text between quote marks"
1269 | HH:MI:SS is 06:19:20 "text between quote marks"
1270 | HH:MI:SS is 08:14:01 "text between quote marks"
1271 | HH:MI:SS is 04:14:02 "text between quote marks"
1272 | HH:MI:SS is 02:14:03 "text between quote marks"
1273 | HH:MI:SS is 03:14:04 "text between quote marks"
1274 | HH:MI:SS is 01:14:05 "text between quote marks"
1275 | HH:MI:SS is 05:32:01 "text between quote marks"
1276 | HH:MI:SS is 05:32:01 "text between quote marks"
1277 | HH:MI:SS is 05:32:00 "text between quote marks"
1278 | HH:MI:SS is 05:32:01 "text between quote marks"
1279 | HH:MI:SS is 05:32:01 "text between quote marks"
1280 | HH:MI:SS is 05:32:01 "text between quote marks"
1281 | HH:MI:SS is 05:32:01 "text between quote marks"
1282 | HH:MI:SS is 05:32:01 "text between quote marks"
1283 | HH:MI:SS is 09:32:01 "text between quote marks"
1284 | HH:MI:SS is 09:32:01 "text between quote marks"
1285 | HH:MI:SS is 09:32:01 "text between quote marks"
1286 | HH:MI:SS is 02:32:01 "text between quote marks"
1287 | HH:MI:SS is 02:32:01 "text between quote marks"
1288 | HH:MI:SS is 06:32:01 "text between quote marks"
1289 | HH:MI:SS is 05:32:01 "text between quote marks"
1290 | HH:MI:SS is 05:32:01 "text between quote marks"
1291 | HH:MI:SS is 05:32:01 "text between quote marks"
1292 | HH:MI:SS is 05:32:01 "text between quote marks"
1293 | HH:MI:SS is 05:32:01 "text between quote marks"
1294 | HH:MI:SS is 05:32:01 "text between quote marks"
1295 | HH:MI:SS is 05:32:01 "text between quote marks"
1296 | HH:MI:SS is 05:32:01 "text between quote marks"
1297 | HH:MI:SS is 05:32:01 "text between quote marks"
1298 | HH:MI:SS is 05:32:01 "text between quote marks"
1299 | HH:MI:SS is 05:32:01 "text between quote marks"
1300 | HH:MI:SS is 05:32:01 "text between quote marks"
1301 | HH:MI:SS is 05:32:01 "text between quote marks"
1302 | HH:MI:SS is 05:32:01 "text between quote marks"
1303 | HH:MI:SS is 05:32:01 "text between quote marks"
1304 | HH:MI:SS is 05:32:01 "text between quote marks"
1305 | HH:MI:SS is 05:32:01 "text between quote marks"
1306 | HH:MI:SS is 05:32:01 "text between quote marks"
1307 | HH:MI:SS is 05:32:01 "text between quote marks"
1308 | HH:MI:SS is 05:32:01 "text between quote marks"
1309 | HH:MI:SS is 05:32:01 "text between quote marks"
1310 | HH:MI:SS is 05:32:01 "text between quote marks"
1311 | HH:MI:SS is 05:32:01 "text between quote marks"
1312 | HH:MI:SS is 05:32:01 "text between quote marks"
1313 | HH:MI:SS is 05:32:01 "text between quote marks"
1314 | HH:MI:SS is 05:32:01 "text between quote marks"
1315 | HH:MI:SS is 05:32:01 "text between quote marks"
1316 | HH:MI:SS is 05:32:01 "text between quote marks"
1317 | HH:MI:SS is 05:32:01 "text between quote marks"
1318 | HH:MI:SS is 05:32:01 "text between quote marks"
1322 SELECT '' AS to_char_7, to_char(d1, 'HH24--text--MI--text--SS')
1323 FROM TIMESTAMPTZ_TBL;
1325 -----------+------------------------
1328 | 16--text--00--text--00
1329 | 17--text--32--text--01
1330 | 17--text--32--text--01
1331 | 17--text--32--text--02
1332 | 17--text--32--text--01
1333 | 17--text--32--text--01
1334 | 17--text--32--text--01
1335 | 00--text--00--text--00
1336 | 03--text--04--text--05
1337 | 17--text--32--text--01
1338 | 17--text--32--text--01
1339 | 17--text--32--text--01
1340 | 17--text--32--text--01
1341 | 17--text--32--text--01
1342 | 18--text--19--text--20
1343 | 08--text--14--text--01
1344 | 04--text--14--text--02
1345 | 02--text--14--text--03
1346 | 03--text--14--text--04
1347 | 01--text--14--text--05
1348 | 17--text--32--text--01
1349 | 17--text--32--text--01
1350 | 17--text--32--text--00
1351 | 17--text--32--text--01
1352 | 17--text--32--text--01
1353 | 17--text--32--text--01
1354 | 17--text--32--text--01
1355 | 17--text--32--text--01
1356 | 09--text--32--text--01
1357 | 09--text--32--text--01
1358 | 09--text--32--text--01
1359 | 14--text--32--text--01
1360 | 14--text--32--text--01
1361 | 18--text--32--text--01
1362 | 17--text--32--text--01
1363 | 17--text--32--text--01
1364 | 17--text--32--text--01
1365 | 17--text--32--text--01
1366 | 17--text--32--text--01
1367 | 17--text--32--text--01
1368 | 17--text--32--text--01
1369 | 17--text--32--text--01
1370 | 17--text--32--text--01
1371 | 17--text--32--text--01
1372 | 17--text--32--text--01
1373 | 17--text--32--text--01
1374 | 17--text--32--text--01
1375 | 17--text--32--text--01
1376 | 17--text--32--text--01
1377 | 17--text--32--text--01
1378 | 17--text--32--text--01
1379 | 17--text--32--text--01
1380 | 17--text--32--text--01
1381 | 17--text--32--text--01
1382 | 17--text--32--text--01
1383 | 17--text--32--text--01
1384 | 17--text--32--text--01
1385 | 17--text--32--text--01
1386 | 17--text--32--text--01
1387 | 17--text--32--text--01
1388 | 17--text--32--text--01
1389 | 17--text--32--text--01
1390 | 17--text--32--text--01
1391 | 17--text--32--text--01
1394 SELECT '' AS to_char_8, to_char(d1, 'YYYYTH YYYYth Jth')
1395 FROM TIMESTAMPTZ_TBL;
1397 -----------+-------------------------
1400 | 1969TH 1969th 2440587th
1401 | 1997TH 1997th 2450490th
1402 | 1997TH 1997th 2450490th
1403 | 1997TH 1997th 2450490th
1404 | 1997TH 1997th 2450490th
1405 | 1997TH 1997th 2450490th
1406 | 1997TH 1997th 2450490th
1407 | 1997TH 1997th 2450451st
1408 | 1997TH 1997th 2450451st
1409 | 1997TH 1997th 2450490th
1410 | 1997TH 1997th 2450490th
1411 | 1997TH 1997th 2450490th
1412 | 1997TH 1997th 2450490th
1413 | 1997TH 1997th 2450610th
1414 | 2001ST 2001st 2452175th
1415 | 2000TH 2000th 2451619th
1416 | 2000TH 2000th 2451619th
1417 | 2000TH 2000th 2451619th
1418 | 2000TH 2000th 2451619th
1419 | 2000TH 2000th 2451619th
1420 | 1997TH 1997th 2450490th
1421 | 1997TH 1997th 2450490th
1422 | 1997TH 1997th 2450490th
1423 | 1997TH 1997th 2450490th
1424 | 1997TH 1997th 2450490th
1425 | 1997TH 1997th 2450490th
1426 | 1997TH 1997th 2450490th
1427 | 1997TH 1997th 2450490th
1428 | 1997TH 1997th 2450490th
1429 | 1997TH 1997th 2450490th
1430 | 1997TH 1997th 2450490th
1431 | 1997TH 1997th 2450490th
1432 | 1997TH 1997th 2450640th
1433 | 1997TH 1997th 2450610th
1434 | 1997TH 1997th 2450490th
1435 | 1997TH 1997th 2450491st
1436 | 1997TH 1997th 2450492nd
1437 | 1997TH 1997th 2450493rd
1438 | 1997TH 1997th 2450494th
1439 | 1997TH 1997th 2450495th
1440 | 1997TH 1997th 2450496th
1441 | 0097TH 0097th 1686042nd
1442 | 0097TH 0097th 1756536th
1443 | 0597TH 0597th 1939157th
1444 | 1097TH 1097th 2121778th
1445 | 1697TH 1697th 2340924th
1446 | 1797TH 1797th 2377448th
1447 | 1897TH 1897th 2413972nd
1448 | 1997TH 1997th 2450496th
1449 | 2097TH 2097th 2487021st
1450 | 1996TH 1996th 2450142nd
1451 | 1996TH 1996th 2450143rd
1452 | 1996TH 1996th 2450144th
1453 | 1996TH 1996th 2450448th
1454 | 1996TH 1996th 2450449th
1455 | 1997TH 1997th 2450450th
1456 | 1997TH 1997th 2450508th
1457 | 1997TH 1997th 2450509th
1458 | 1997TH 1997th 2450813th
1459 | 1997TH 1997th 2450814th
1460 | 1999TH 1999th 2451544th
1461 | 2000TH 2000th 2451545th
1462 | 2000TH 2000th 2451910th
1463 | 2001ST 2001st 2451911th
1467 SELECT '' AS to_char_9, to_char(d1, 'YYYY A.D. YYYY a.d. YYYY bc HH:MI:SS P.M. HH:MI:SS p.m. HH:MI:SS pm')
1468 FROM TIMESTAMPTZ_TBL;
1470 -----------+---------------------------------------------------------------------
1473 | 1969 A.D. 1969 a.d. 1969 ad 04:00:00 P.M. 04:00:00 p.m. 04:00:00 pm
1474 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1475 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1476 | 1997 A.D. 1997 a.d. 1997 ad 05:32:02 P.M. 05:32:02 p.m. 05:32:02 pm
1477 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1478 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1479 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1480 | 1997 A.D. 1997 a.d. 1997 ad 12:00:00 A.M. 12:00:00 a.m. 12:00:00 am
1481 | 1997 A.D. 1997 a.d. 1997 ad 03:04:05 A.M. 03:04:05 a.m. 03:04:05 am
1482 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1483 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1484 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1485 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1486 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1487 | 2001 A.D. 2001 a.d. 2001 ad 06:19:20 P.M. 06:19:20 p.m. 06:19:20 pm
1488 | 2000 A.D. 2000 a.d. 2000 ad 08:14:01 A.M. 08:14:01 a.m. 08:14:01 am
1489 | 2000 A.D. 2000 a.d. 2000 ad 04:14:02 A.M. 04:14:02 a.m. 04:14:02 am
1490 | 2000 A.D. 2000 a.d. 2000 ad 02:14:03 A.M. 02:14:03 a.m. 02:14:03 am
1491 | 2000 A.D. 2000 a.d. 2000 ad 03:14:04 A.M. 03:14:04 a.m. 03:14:04 am
1492 | 2000 A.D. 2000 a.d. 2000 ad 01:14:05 A.M. 01:14:05 a.m. 01:14:05 am
1493 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1494 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1495 | 1997 A.D. 1997 a.d. 1997 ad 05:32:00 P.M. 05:32:00 p.m. 05:32:00 pm
1496 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1497 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1498 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1499 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1500 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1501 | 1997 A.D. 1997 a.d. 1997 ad 09:32:01 A.M. 09:32:01 a.m. 09:32:01 am
1502 | 1997 A.D. 1997 a.d. 1997 ad 09:32:01 A.M. 09:32:01 a.m. 09:32:01 am
1503 | 1997 A.D. 1997 a.d. 1997 ad 09:32:01 A.M. 09:32:01 a.m. 09:32:01 am
1504 | 1997 A.D. 1997 a.d. 1997 ad 02:32:01 P.M. 02:32:01 p.m. 02:32:01 pm
1505 | 1997 A.D. 1997 a.d. 1997 ad 02:32:01 P.M. 02:32:01 p.m. 02:32:01 pm
1506 | 1997 A.D. 1997 a.d. 1997 ad 06:32:01 P.M. 06:32:01 p.m. 06:32:01 pm
1507 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1508 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1509 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1510 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1511 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1512 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1513 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1514 | 0097 B.C. 0097 b.c. 0097 bc 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1515 | 0097 A.D. 0097 a.d. 0097 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1516 | 0597 A.D. 0597 a.d. 0597 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1517 | 1097 A.D. 1097 a.d. 1097 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1518 | 1697 A.D. 1697 a.d. 1697 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1519 | 1797 A.D. 1797 a.d. 1797 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1520 | 1897 A.D. 1897 a.d. 1897 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1521 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1522 | 2097 A.D. 2097 a.d. 2097 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1523 | 1996 A.D. 1996 a.d. 1996 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1524 | 1996 A.D. 1996 a.d. 1996 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1525 | 1996 A.D. 1996 a.d. 1996 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1526 | 1996 A.D. 1996 a.d. 1996 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1527 | 1996 A.D. 1996 a.d. 1996 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1528 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1529 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1530 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1531 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1532 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1533 | 1999 A.D. 1999 a.d. 1999 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1534 | 2000 A.D. 2000 a.d. 2000 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1535 | 2000 A.D. 2000 a.d. 2000 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1536 | 2001 A.D. 2001 a.d. 2001 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1539 SELECT '' AS to_char_10, to_char(d1, 'IYYY IYY IY I IW IDDD ID')
1540 FROM TIMESTAMPTZ_TBL;
1541 to_char_10 | to_char
1542 ------------+------------------------
1545 | 1970 970 70 0 01 003 3
1546 | 1997 997 97 7 07 043 1
1547 | 1997 997 97 7 07 043 1
1548 | 1997 997 97 7 07 043 1
1549 | 1997 997 97 7 07 043 1
1550 | 1997 997 97 7 07 043 1
1551 | 1997 997 97 7 07 043 1
1552 | 1997 997 97 7 01 004 4
1553 | 1997 997 97 7 01 004 4
1554 | 1997 997 97 7 07 043 1
1555 | 1997 997 97 7 07 043 1
1556 | 1997 997 97 7 07 043 1
1557 | 1997 997 97 7 07 043 1
1558 | 1997 997 97 7 24 163 2
1559 | 2001 001 01 1 38 265 6
1560 | 2000 000 00 0 11 073 3
1561 | 2000 000 00 0 11 073 3
1562 | 2000 000 00 0 11 073 3
1563 | 2000 000 00 0 11 073 3
1564 | 2000 000 00 0 11 073 3
1565 | 1997 997 97 7 07 043 1
1566 | 1997 997 97 7 07 043 1
1567 | 1997 997 97 7 07 043 1
1568 | 1997 997 97 7 07 043 1
1569 | 1997 997 97 7 07 043 1
1570 | 1997 997 97 7 07 043 1
1571 | 1997 997 97 7 07 043 1
1572 | 1997 997 97 7 07 043 1
1573 | 1997 997 97 7 07 043 1
1574 | 1997 997 97 7 07 043 1
1575 | 1997 997 97 7 07 043 1
1576 | 1997 997 97 7 07 043 1
1577 | 1997 997 97 7 28 193 4
1578 | 1997 997 97 7 24 163 2
1579 | 1997 997 97 7 07 043 1
1580 | 1997 997 97 7 07 044 2
1581 | 1997 997 97 7 07 045 3
1582 | 1997 997 97 7 07 046 4
1583 | 1997 997 97 7 07 047 5
1584 | 1997 997 97 7 07 048 6
1585 | 1997 997 97 7 07 049 7
1586 | 0097 097 97 7 07 044 2
1587 | 0097 097 97 7 07 048 6
1588 | 0597 597 97 7 07 046 4
1589 | 1097 097 97 7 07 044 2
1590 | 1697 697 97 7 07 048 6
1591 | 1797 797 97 7 07 046 4
1592 | 1897 897 97 7 07 044 2
1593 | 1997 997 97 7 07 049 7
1594 | 2097 097 97 7 07 048 6
1595 | 1996 996 96 6 09 059 3
1596 | 1996 996 96 6 09 060 4
1597 | 1996 996 96 6 09 061 5
1598 | 1997 997 97 7 01 001 1
1599 | 1997 997 97 7 01 002 2
1600 | 1997 997 97 7 01 003 3
1601 | 1997 997 97 7 09 061 5
1602 | 1997 997 97 7 09 062 6
1603 | 1998 998 98 8 01 002 2
1604 | 1998 998 98 8 01 003 3
1605 | 1999 999 99 9 52 362 5
1606 | 1999 999 99 9 52 363 6
1607 | 2000 000 00 0 52 364 7
1608 | 2001 001 01 1 01 001 1
1611 SELECT '' AS to_char_11, to_char(d1, 'FMIYYY FMIYY FMIY FMI FMIW FMIDDD FMID')
1612 FROM TIMESTAMPTZ_TBL;
1613 to_char_11 | to_char
1614 ------------+------------------------
1617 | 1970 970 70 0 1 3 3
1618 | 1997 997 97 7 7 43 1
1619 | 1997 997 97 7 7 43 1
1620 | 1997 997 97 7 7 43 1
1621 | 1997 997 97 7 7 43 1
1622 | 1997 997 97 7 7 43 1
1623 | 1997 997 97 7 7 43 1
1624 | 1997 997 97 7 1 4 4
1625 | 1997 997 97 7 1 4 4
1626 | 1997 997 97 7 7 43 1
1627 | 1997 997 97 7 7 43 1
1628 | 1997 997 97 7 7 43 1
1629 | 1997 997 97 7 7 43 1
1630 | 1997 997 97 7 24 163 2
1631 | 2001 001 01 1 38 265 6
1632 | 2000 000 00 0 11 73 3
1633 | 2000 000 00 0 11 73 3
1634 | 2000 000 00 0 11 73 3
1635 | 2000 000 00 0 11 73 3
1636 | 2000 000 00 0 11 73 3
1637 | 1997 997 97 7 7 43 1
1638 | 1997 997 97 7 7 43 1
1639 | 1997 997 97 7 7 43 1
1640 | 1997 997 97 7 7 43 1
1641 | 1997 997 97 7 7 43 1
1642 | 1997 997 97 7 7 43 1
1643 | 1997 997 97 7 7 43 1
1644 | 1997 997 97 7 7 43 1
1645 | 1997 997 97 7 7 43 1
1646 | 1997 997 97 7 7 43 1
1647 | 1997 997 97 7 7 43 1
1648 | 1997 997 97 7 7 43 1
1649 | 1997 997 97 7 28 193 4
1650 | 1997 997 97 7 24 163 2
1651 | 1997 997 97 7 7 43 1
1652 | 1997 997 97 7 7 44 2
1653 | 1997 997 97 7 7 45 3
1654 | 1997 997 97 7 7 46 4
1655 | 1997 997 97 7 7 47 5
1656 | 1997 997 97 7 7 48 6
1657 | 1997 997 97 7 7 49 7
1658 | 97 097 97 7 7 44 2
1659 | 97 097 97 7 7 48 6
1660 | 597 597 97 7 7 46 4
1661 | 1097 097 97 7 7 44 2
1662 | 1697 697 97 7 7 48 6
1663 | 1797 797 97 7 7 46 4
1664 | 1897 897 97 7 7 44 2
1665 | 1997 997 97 7 7 49 7
1666 | 2097 097 97 7 7 48 6
1667 | 1996 996 96 6 9 59 3
1668 | 1996 996 96 6 9 60 4
1669 | 1996 996 96 6 9 61 5
1670 | 1997 997 97 7 1 1 1
1671 | 1997 997 97 7 1 2 2
1672 | 1997 997 97 7 1 3 3
1673 | 1997 997 97 7 9 61 5
1674 | 1997 997 97 7 9 62 6
1675 | 1998 998 98 8 1 2 2
1676 | 1998 998 98 8 1 3 3
1677 | 1999 999 99 9 52 362 5
1678 | 1999 999 99 9 52 363 6
1679 | 2000 000 00 0 52 364 7
1680 | 2001 001 01 1 1 1 1