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 ('current');
87 ERROR: date/time value "current" is no longer supported
88 LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('current');
90 -- Postgres v6.0 standard output format
91 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01 1997 PST');
92 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Invalid Abstime');
93 ERROR: date/time value "Invalid Abstime" is no longer supported
94 LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('Invalid Abstime');
96 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Undefined Abstime');
97 ERROR: date/time value "Undefined Abstime" is no longer supported
98 LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('Undefined Abstime');
100 -- Variations on Postgres v6.1 standard output format
101 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.000001 1997 PST');
102 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.999999 1997 PST');
103 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.4 1997 PST');
104 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.5 1997 PST');
105 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.6 1997 PST');
107 INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-01-02');
108 INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-01-02 03:04:05');
109 INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01-08');
110 INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01-0800');
111 INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01 -08:00');
112 INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970210 173201 -0800');
113 INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-06-10 17:32:01 -07:00');
114 INSERT INTO TIMESTAMPTZ_TBL VALUES ('2001-09-22T18:19:20');
115 -- POSIX format (note that the timezone abbrev is just decoration here)
116 INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 08:14:01 GMT+8');
117 INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 13:14:02 GMT-1');
118 INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 12:14:03 GMT-2');
119 INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 03:14:04 PST+8');
120 INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 02:14:05 MST+7:00');
121 -- Variations for acceptable input formats
122 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 17:32:01 1997 -0800');
123 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 17:32:01 1997');
124 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 5:32PM 1997');
125 INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997/02/10 17:32:01-0800');
126 INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01 PST');
127 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb-10-1997 17:32:01 PST');
128 INSERT INTO TIMESTAMPTZ_TBL VALUES ('02-10-1997 17:32:01 PST');
129 INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970210 173201 PST');
130 set datestyle to ymd;
131 INSERT INTO TIMESTAMPTZ_TBL VALUES ('97FEB10 5:32:01PM UTC');
132 INSERT INTO TIMESTAMPTZ_TBL VALUES ('97/02/10 17:32:01 UTC');
134 INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997.041 17:32:01 UTC');
135 -- timestamps at different timezones
136 INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970210 173201 America/New_York');
137 SELECT '19970210 173201' AT TIME ZONE 'America/New_York';
139 --------------------------
140 Mon Feb 10 20:32:01 1997
143 INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970710 173201 America/New_York');
144 SELECT '19970710 173201' AT TIME ZONE 'America/New_York';
146 --------------------------
147 Thu Jul 10 20:32:01 1997
150 INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970710 173201 America/Does_not_exist');
151 ERROR: time zone "america/does_not_exist" not recognized
152 LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970710 173201 America...
154 SELECT '19970710 173201' AT TIME ZONE 'America/Does_not_exist';
155 ERROR: time zone "America/Does_not_exist" not recognized
156 -- Daylight saving time for timestamps beyond 32-bit time_t range.
157 SELECT '20500710 173201 Europe/Helsinki'::timestamptz; -- DST
159 ------------------------------
160 Sun Jul 10 07:32:01 2050 PDT
163 SELECT '20500110 173201 Europe/Helsinki'::timestamptz; -- non-DST
165 ------------------------------
166 Mon Jan 10 07:32:01 2050 PST
169 SELECT '205000-07-10 17:32:01 Europe/Helsinki'::timestamptz; -- DST
171 --------------------------------
172 Thu Jul 10 07:32:01 205000 PDT
175 SELECT '205000-01-10 17:32:01 Europe/Helsinki'::timestamptz; -- non-DST
177 --------------------------------
178 Fri Jan 10 07:32:01 205000 PST
181 -- Check date conversion and date arithmetic
182 INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-06-10 18:32:01 PDT');
183 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 17:32:01 1997');
184 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 11 17:32:01 1997');
185 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 12 17:32:01 1997');
186 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 13 17:32:01 1997');
187 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 14 17:32:01 1997');
188 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 15 17:32:01 1997');
189 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1997');
190 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 0097 BC');
191 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 0097');
192 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 0597');
193 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1097');
194 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1697');
195 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1797');
196 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1897');
197 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 1997');
198 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 2097');
199 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 28 17:32:01 1996');
200 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 29 17:32:01 1996');
201 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mar 01 17:32:01 1996');
202 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 30 17:32:01 1996');
203 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 1996');
204 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Jan 01 17:32:01 1997');
205 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 28 17:32:01 1997');
206 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 29 17:32:01 1997');
207 ERROR: date/time field value out of range: "Feb 29 17:32:01 1997"
208 LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 29 17:32:01 1997');
210 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mar 01 17:32:01 1997');
211 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 30 17:32:01 1997');
212 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 1997');
213 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 1999');
214 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Jan 01 17:32:01 2000');
215 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Dec 31 17:32:01 2000');
216 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Jan 01 17:32:01 2001');
217 -- Currently unsupported syntax and ranges
218 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 -0097');
219 ERROR: time zone displacement out of range: "Feb 16 17:32:01 -0097"
220 LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 -0097')...
222 INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 5097 BC');
223 ERROR: timestamp out of range: "Feb 16 17:32:01 5097 BC"
224 LINE 1: INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 16 17:32:01 5097 BC...
226 -- Alternative field order that we've historically supported (sort of)
227 -- with regular and POSIXy timezone specs
228 SELECT 'Wed Jul 11 10:51:14 America/New_York 2001'::timestamptz;
230 ------------------------------
231 Wed Jul 11 07:51:14 2001 PDT
234 SELECT 'Wed Jul 11 10:51:14 GMT-4 2001'::timestamptz;
236 ------------------------------
237 Tue Jul 10 23:51:14 2001 PDT
240 SELECT 'Wed Jul 11 10:51:14 GMT+4 2001'::timestamptz;
242 ------------------------------
243 Wed Jul 11 07:51:14 2001 PDT
246 SELECT 'Wed Jul 11 10:51:14 PST-03:00 2001'::timestamptz;
248 ------------------------------
249 Wed Jul 11 00:51:14 2001 PDT
252 SELECT 'Wed Jul 11 10:51:14 PST+03:00 2001'::timestamptz;
254 ------------------------------
255 Wed Jul 11 06:51:14 2001 PDT
258 SELECT '' AS "64", d1 FROM TIMESTAMPTZ_TBL;
260 ----+---------------------------------
263 | Wed Dec 31 16:00:00 1969 PST
264 | Mon Feb 10 17:32:01 1997 PST
265 | Mon Feb 10 17:32:01 1997 PST
266 | Mon Feb 10 17:32:02 1997 PST
267 | Mon Feb 10 17:32:01.4 1997 PST
268 | Mon Feb 10 17:32:01.5 1997 PST
269 | Mon Feb 10 17:32:01.6 1997 PST
270 | Thu Jan 02 00:00:00 1997 PST
271 | Thu Jan 02 03:04:05 1997 PST
272 | Mon Feb 10 17:32:01 1997 PST
273 | Mon Feb 10 17:32:01 1997 PST
274 | Mon Feb 10 17:32:01 1997 PST
275 | Mon Feb 10 17:32:01 1997 PST
276 | Tue Jun 10 17:32:01 1997 PDT
277 | Sat Sep 22 18:19:20 2001 PDT
278 | Wed Mar 15 08:14:01 2000 PST
279 | Wed Mar 15 04:14:02 2000 PST
280 | Wed Mar 15 02:14:03 2000 PST
281 | Wed Mar 15 03:14:04 2000 PST
282 | Wed Mar 15 01:14:05 2000 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:00 1997 PST
286 | Mon Feb 10 17:32:01 1997 PST
287 | Mon Feb 10 17:32:01 1997 PST
288 | Mon Feb 10 17:32:01 1997 PST
289 | Mon Feb 10 17:32:01 1997 PST
290 | Mon Feb 10 17:32:01 1997 PST
291 | Mon Feb 10 09:32:01 1997 PST
292 | Mon Feb 10 09:32:01 1997 PST
293 | Mon Feb 10 09:32:01 1997 PST
294 | Mon Feb 10 14:32:01 1997 PST
295 | Thu Jul 10 14:32:01 1997 PDT
296 | Tue Jun 10 18:32:01 1997 PDT
297 | Mon Feb 10 17:32:01 1997 PST
298 | Tue Feb 11 17:32:01 1997 PST
299 | Wed Feb 12 17:32:01 1997 PST
300 | Thu Feb 13 17:32:01 1997 PST
301 | Fri Feb 14 17:32:01 1997 PST
302 | Sat Feb 15 17:32:01 1997 PST
303 | Sun Feb 16 17:32:01 1997 PST
304 | Tue Feb 16 17:32:01 0097 PST BC
305 | Sat Feb 16 17:32:01 0097 PST
306 | Thu Feb 16 17:32:01 0597 PST
307 | Tue Feb 16 17:32:01 1097 PST
308 | Sat Feb 16 17:32:01 1697 PST
309 | Thu Feb 16 17:32:01 1797 PST
310 | Tue Feb 16 17:32:01 1897 PST
311 | Sun Feb 16 17:32:01 1997 PST
312 | Sat Feb 16 17:32:01 2097 PST
313 | Wed Feb 28 17:32:01 1996 PST
314 | Thu Feb 29 17:32:01 1996 PST
315 | Fri Mar 01 17:32:01 1996 PST
316 | Mon Dec 30 17:32:01 1996 PST
317 | Tue Dec 31 17:32:01 1996 PST
318 | Wed Jan 01 17:32:01 1997 PST
319 | Fri Feb 28 17:32:01 1997 PST
320 | Sat Mar 01 17:32:01 1997 PST
321 | Tue Dec 30 17:32:01 1997 PST
322 | Wed Dec 31 17:32:01 1997 PST
323 | Fri Dec 31 17:32:01 1999 PST
324 | Sat Jan 01 17:32:01 2000 PST
325 | Sun Dec 31 17:32:01 2000 PST
326 | Mon Jan 01 17:32:01 2001 PST
329 -- Demonstrate functions and operators
330 SELECT '' AS "48", d1 FROM TIMESTAMPTZ_TBL
331 WHERE d1 > timestamp with time zone '1997-01-02';
333 ----+--------------------------------
335 | Mon Feb 10 17:32:01 1997 PST
336 | Mon Feb 10 17:32:01 1997 PST
337 | Mon Feb 10 17:32:02 1997 PST
338 | Mon Feb 10 17:32:01.4 1997 PST
339 | Mon Feb 10 17:32:01.5 1997 PST
340 | Mon Feb 10 17:32:01.6 1997 PST
341 | Thu Jan 02 03:04:05 1997 PST
342 | Mon Feb 10 17:32:01 1997 PST
343 | Mon Feb 10 17:32:01 1997 PST
344 | Mon Feb 10 17:32:01 1997 PST
345 | Mon Feb 10 17:32:01 1997 PST
346 | Tue Jun 10 17:32:01 1997 PDT
347 | Sat Sep 22 18:19:20 2001 PDT
348 | Wed Mar 15 08:14:01 2000 PST
349 | Wed Mar 15 04:14:02 2000 PST
350 | Wed Mar 15 02:14:03 2000 PST
351 | Wed Mar 15 03:14:04 2000 PST
352 | Wed Mar 15 01:14:05 2000 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:00 1997 PST
356 | Mon Feb 10 17:32:01 1997 PST
357 | Mon Feb 10 17:32:01 1997 PST
358 | Mon Feb 10 17:32:01 1997 PST
359 | Mon Feb 10 17:32:01 1997 PST
360 | Mon Feb 10 17:32:01 1997 PST
361 | Mon Feb 10 09:32:01 1997 PST
362 | Mon Feb 10 09:32:01 1997 PST
363 | Mon Feb 10 09:32:01 1997 PST
364 | Mon Feb 10 14:32:01 1997 PST
365 | Thu Jul 10 14:32:01 1997 PDT
366 | Tue Jun 10 18:32:01 1997 PDT
367 | Mon Feb 10 17:32:01 1997 PST
368 | Tue Feb 11 17:32:01 1997 PST
369 | Wed Feb 12 17:32:01 1997 PST
370 | Thu Feb 13 17:32:01 1997 PST
371 | Fri Feb 14 17:32:01 1997 PST
372 | Sat Feb 15 17:32:01 1997 PST
373 | Sun Feb 16 17:32:01 1997 PST
374 | Sun Feb 16 17:32:01 1997 PST
375 | Sat Feb 16 17:32:01 2097 PST
376 | Fri Feb 28 17:32:01 1997 PST
377 | Sat Mar 01 17:32:01 1997 PST
378 | Tue Dec 30 17:32:01 1997 PST
379 | Wed Dec 31 17:32:01 1997 PST
380 | Fri Dec 31 17:32:01 1999 PST
381 | Sat Jan 01 17:32:01 2000 PST
382 | Sun Dec 31 17:32:01 2000 PST
383 | Mon Jan 01 17:32:01 2001 PST
386 SELECT '' AS "15", d1 FROM TIMESTAMPTZ_TBL
387 WHERE d1 < timestamp with time zone '1997-01-02';
389 ----+---------------------------------
391 | Wed Dec 31 16:00:00 1969 PST
392 | Tue Feb 16 17:32:01 0097 PST BC
393 | Sat Feb 16 17:32:01 0097 PST
394 | Thu Feb 16 17:32:01 0597 PST
395 | Tue Feb 16 17:32:01 1097 PST
396 | Sat Feb 16 17:32:01 1697 PST
397 | Thu Feb 16 17:32:01 1797 PST
398 | Tue Feb 16 17:32:01 1897 PST
399 | Wed Feb 28 17:32:01 1996 PST
400 | Thu Feb 29 17:32:01 1996 PST
401 | Fri Mar 01 17:32:01 1996 PST
402 | Mon Dec 30 17:32:01 1996 PST
403 | Tue Dec 31 17:32:01 1996 PST
404 | Wed Jan 01 17:32:01 1997 PST
407 SELECT '' AS one, d1 FROM TIMESTAMPTZ_TBL
408 WHERE d1 = timestamp with time zone '1997-01-02';
410 -----+------------------------------
411 | Thu Jan 02 00:00:00 1997 PST
414 SELECT '' AS "63", d1 FROM TIMESTAMPTZ_TBL
415 WHERE d1 != timestamp with time zone '1997-01-02';
417 ----+---------------------------------
420 | Wed Dec 31 16:00:00 1969 PST
421 | Mon Feb 10 17:32:01 1997 PST
422 | Mon Feb 10 17:32:01 1997 PST
423 | Mon Feb 10 17:32:02 1997 PST
424 | Mon Feb 10 17:32:01.4 1997 PST
425 | Mon Feb 10 17:32:01.5 1997 PST
426 | Mon Feb 10 17:32:01.6 1997 PST
427 | Thu Jan 02 03:04:05 1997 PST
428 | Mon Feb 10 17:32:01 1997 PST
429 | Mon Feb 10 17:32:01 1997 PST
430 | Mon Feb 10 17:32:01 1997 PST
431 | Mon Feb 10 17:32:01 1997 PST
432 | Tue Jun 10 17:32:01 1997 PDT
433 | Sat Sep 22 18:19:20 2001 PDT
434 | Wed Mar 15 08:14:01 2000 PST
435 | Wed Mar 15 04:14:02 2000 PST
436 | Wed Mar 15 02:14:03 2000 PST
437 | Wed Mar 15 03:14:04 2000 PST
438 | Wed Mar 15 01:14:05 2000 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:00 1997 PST
442 | Mon Feb 10 17:32:01 1997 PST
443 | Mon Feb 10 17:32:01 1997 PST
444 | Mon Feb 10 17:32:01 1997 PST
445 | Mon Feb 10 17:32:01 1997 PST
446 | Mon Feb 10 17:32:01 1997 PST
447 | Mon Feb 10 09:32:01 1997 PST
448 | Mon Feb 10 09:32:01 1997 PST
449 | Mon Feb 10 09:32:01 1997 PST
450 | Mon Feb 10 14:32:01 1997 PST
451 | Thu Jul 10 14:32:01 1997 PDT
452 | Tue Jun 10 18:32:01 1997 PDT
453 | Mon Feb 10 17:32:01 1997 PST
454 | Tue Feb 11 17:32:01 1997 PST
455 | Wed Feb 12 17:32:01 1997 PST
456 | Thu Feb 13 17:32:01 1997 PST
457 | Fri Feb 14 17:32:01 1997 PST
458 | Sat Feb 15 17:32:01 1997 PST
459 | Sun Feb 16 17:32:01 1997 PST
460 | Tue Feb 16 17:32:01 0097 PST BC
461 | Sat Feb 16 17:32:01 0097 PST
462 | Thu Feb 16 17:32:01 0597 PST
463 | Tue Feb 16 17:32:01 1097 PST
464 | Sat Feb 16 17:32:01 1697 PST
465 | Thu Feb 16 17:32:01 1797 PST
466 | Tue Feb 16 17:32:01 1897 PST
467 | Sun Feb 16 17:32:01 1997 PST
468 | Sat Feb 16 17:32:01 2097 PST
469 | Wed Feb 28 17:32:01 1996 PST
470 | Thu Feb 29 17:32:01 1996 PST
471 | Fri Mar 01 17:32:01 1996 PST
472 | Mon Dec 30 17:32:01 1996 PST
473 | Tue Dec 31 17:32:01 1996 PST
474 | Wed Jan 01 17:32:01 1997 PST
475 | Fri Feb 28 17:32:01 1997 PST
476 | Sat Mar 01 17:32:01 1997 PST
477 | Tue Dec 30 17:32:01 1997 PST
478 | Wed Dec 31 17:32:01 1997 PST
479 | Fri Dec 31 17:32:01 1999 PST
480 | Sat Jan 01 17:32:01 2000 PST
481 | Sun Dec 31 17:32:01 2000 PST
482 | Mon Jan 01 17:32:01 2001 PST
485 SELECT '' AS "16", d1 FROM TIMESTAMPTZ_TBL
486 WHERE d1 <= timestamp with time zone '1997-01-02';
488 ----+---------------------------------
490 | Wed Dec 31 16:00:00 1969 PST
491 | Thu Jan 02 00:00:00 1997 PST
492 | Tue Feb 16 17:32:01 0097 PST BC
493 | Sat Feb 16 17:32:01 0097 PST
494 | Thu Feb 16 17:32:01 0597 PST
495 | Tue Feb 16 17:32:01 1097 PST
496 | Sat Feb 16 17:32:01 1697 PST
497 | Thu Feb 16 17:32:01 1797 PST
498 | Tue Feb 16 17:32:01 1897 PST
499 | Wed Feb 28 17:32:01 1996 PST
500 | Thu Feb 29 17:32:01 1996 PST
501 | Fri Mar 01 17:32:01 1996 PST
502 | Mon Dec 30 17:32:01 1996 PST
503 | Tue Dec 31 17:32:01 1996 PST
504 | Wed Jan 01 17:32:01 1997 PST
507 SELECT '' AS "49", d1 FROM TIMESTAMPTZ_TBL
508 WHERE d1 >= timestamp with time zone '1997-01-02';
510 ----+--------------------------------
512 | Mon Feb 10 17:32:01 1997 PST
513 | Mon Feb 10 17:32:01 1997 PST
514 | Mon Feb 10 17:32:02 1997 PST
515 | Mon Feb 10 17:32:01.4 1997 PST
516 | Mon Feb 10 17:32:01.5 1997 PST
517 | Mon Feb 10 17:32:01.6 1997 PST
518 | Thu Jan 02 00:00:00 1997 PST
519 | Thu Jan 02 03:04:05 1997 PST
520 | Mon Feb 10 17:32:01 1997 PST
521 | Mon Feb 10 17:32:01 1997 PST
522 | Mon Feb 10 17:32:01 1997 PST
523 | Mon Feb 10 17:32:01 1997 PST
524 | Tue Jun 10 17:32:01 1997 PDT
525 | Sat Sep 22 18:19:20 2001 PDT
526 | Wed Mar 15 08:14:01 2000 PST
527 | Wed Mar 15 04:14:02 2000 PST
528 | Wed Mar 15 02:14:03 2000 PST
529 | Wed Mar 15 03:14:04 2000 PST
530 | Wed Mar 15 01:14:05 2000 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:00 1997 PST
534 | Mon Feb 10 17:32:01 1997 PST
535 | Mon Feb 10 17:32:01 1997 PST
536 | Mon Feb 10 17:32:01 1997 PST
537 | Mon Feb 10 17:32:01 1997 PST
538 | Mon Feb 10 17:32:01 1997 PST
539 | Mon Feb 10 09:32:01 1997 PST
540 | Mon Feb 10 09:32:01 1997 PST
541 | Mon Feb 10 09:32:01 1997 PST
542 | Mon Feb 10 14:32:01 1997 PST
543 | Thu Jul 10 14:32:01 1997 PDT
544 | Tue Jun 10 18:32:01 1997 PDT
545 | Mon Feb 10 17:32:01 1997 PST
546 | Tue Feb 11 17:32:01 1997 PST
547 | Wed Feb 12 17:32:01 1997 PST
548 | Thu Feb 13 17:32:01 1997 PST
549 | Fri Feb 14 17:32:01 1997 PST
550 | Sat Feb 15 17:32:01 1997 PST
551 | Sun Feb 16 17:32:01 1997 PST
552 | Sun Feb 16 17:32:01 1997 PST
553 | Sat Feb 16 17:32:01 2097 PST
554 | Fri Feb 28 17:32:01 1997 PST
555 | Sat Mar 01 17:32:01 1997 PST
556 | Tue Dec 30 17:32:01 1997 PST
557 | Wed Dec 31 17:32:01 1997 PST
558 | Fri Dec 31 17:32:01 1999 PST
559 | Sat Jan 01 17:32:01 2000 PST
560 | Sun Dec 31 17:32:01 2000 PST
561 | Mon Jan 01 17:32:01 2001 PST
564 SELECT '' AS "54", d1 - timestamp with time zone '1997-01-02' AS diff
565 FROM TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
567 ----+----------------------------------------
568 | @ 9863 days 8 hours ago
569 | @ 39 days 17 hours 32 mins 1 sec
570 | @ 39 days 17 hours 32 mins 1 sec
571 | @ 39 days 17 hours 32 mins 2 secs
572 | @ 39 days 17 hours 32 mins 1.4 secs
573 | @ 39 days 17 hours 32 mins 1.5 secs
574 | @ 39 days 17 hours 32 mins 1.6 secs
576 | @ 3 hours 4 mins 5 secs
577 | @ 39 days 17 hours 32 mins 1 sec
578 | @ 39 days 17 hours 32 mins 1 sec
579 | @ 39 days 17 hours 32 mins 1 sec
580 | @ 39 days 17 hours 32 mins 1 sec
581 | @ 159 days 16 hours 32 mins 1 sec
582 | @ 1724 days 17 hours 19 mins 20 secs
583 | @ 1168 days 8 hours 14 mins 1 sec
584 | @ 1168 days 4 hours 14 mins 2 secs
585 | @ 1168 days 2 hours 14 mins 3 secs
586 | @ 1168 days 3 hours 14 mins 4 secs
587 | @ 1168 days 1 hour 14 mins 5 secs
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
591 | @ 39 days 17 hours 32 mins 1 sec
592 | @ 39 days 17 hours 32 mins 1 sec
593 | @ 39 days 17 hours 32 mins 1 sec
594 | @ 39 days 17 hours 32 mins 1 sec
595 | @ 39 days 17 hours 32 mins 1 sec
596 | @ 39 days 9 hours 32 mins 1 sec
597 | @ 39 days 9 hours 32 mins 1 sec
598 | @ 39 days 9 hours 32 mins 1 sec
599 | @ 39 days 14 hours 32 mins 1 sec
600 | @ 189 days 13 hours 32 mins 1 sec
601 | @ 159 days 17 hours 32 mins 1 sec
602 | @ 39 days 17 hours 32 mins 1 sec
603 | @ 40 days 17 hours 32 mins 1 sec
604 | @ 41 days 17 hours 32 mins 1 sec
605 | @ 42 days 17 hours 32 mins 1 sec
606 | @ 43 days 17 hours 32 mins 1 sec
607 | @ 44 days 17 hours 32 mins 1 sec
608 | @ 45 days 17 hours 32 mins 1 sec
609 | @ 45 days 17 hours 32 mins 1 sec
610 | @ 308 days 6 hours 27 mins 59 secs ago
611 | @ 307 days 6 hours 27 mins 59 secs ago
612 | @ 306 days 6 hours 27 mins 59 secs ago
613 | @ 2 days 6 hours 27 mins 59 secs ago
614 | @ 1 day 6 hours 27 mins 59 secs ago
615 | @ 6 hours 27 mins 59 secs ago
616 | @ 57 days 17 hours 32 mins 1 sec
617 | @ 58 days 17 hours 32 mins 1 sec
618 | @ 362 days 17 hours 32 mins 1 sec
619 | @ 363 days 17 hours 32 mins 1 sec
620 | @ 1093 days 17 hours 32 mins 1 sec
621 | @ 1094 days 17 hours 32 mins 1 sec
622 | @ 1459 days 17 hours 32 mins 1 sec
623 | @ 1460 days 17 hours 32 mins 1 sec
626 SELECT '' AS date_trunc_week, date_trunc( 'week', timestamp with time zone '2004-02-29 15:44:17.71393' ) AS week_trunc;
627 date_trunc_week | week_trunc
628 -----------------+------------------------------
629 | Mon Feb 23 00:00:00 2004 PST
632 -- Test casting within a BETWEEN qualifier
633 SELECT '' AS "54", d1 - timestamp with time zone '1997-01-02' AS diff
635 WHERE d1 BETWEEN timestamp with time zone '1902-01-01' AND timestamp with time zone '2038-01-01';
637 ----+----------------------------------------
638 | @ 9863 days 8 hours ago
639 | @ 39 days 17 hours 32 mins 1 sec
640 | @ 39 days 17 hours 32 mins 1 sec
641 | @ 39 days 17 hours 32 mins 2 secs
642 | @ 39 days 17 hours 32 mins 1.4 secs
643 | @ 39 days 17 hours 32 mins 1.5 secs
644 | @ 39 days 17 hours 32 mins 1.6 secs
646 | @ 3 hours 4 mins 5 secs
647 | @ 39 days 17 hours 32 mins 1 sec
648 | @ 39 days 17 hours 32 mins 1 sec
649 | @ 39 days 17 hours 32 mins 1 sec
650 | @ 39 days 17 hours 32 mins 1 sec
651 | @ 159 days 16 hours 32 mins 1 sec
652 | @ 1724 days 17 hours 19 mins 20 secs
653 | @ 1168 days 8 hours 14 mins 1 sec
654 | @ 1168 days 4 hours 14 mins 2 secs
655 | @ 1168 days 2 hours 14 mins 3 secs
656 | @ 1168 days 3 hours 14 mins 4 secs
657 | @ 1168 days 1 hour 14 mins 5 secs
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
661 | @ 39 days 17 hours 32 mins 1 sec
662 | @ 39 days 17 hours 32 mins 1 sec
663 | @ 39 days 17 hours 32 mins 1 sec
664 | @ 39 days 17 hours 32 mins 1 sec
665 | @ 39 days 17 hours 32 mins 1 sec
666 | @ 39 days 9 hours 32 mins 1 sec
667 | @ 39 days 9 hours 32 mins 1 sec
668 | @ 39 days 9 hours 32 mins 1 sec
669 | @ 39 days 14 hours 32 mins 1 sec
670 | @ 189 days 13 hours 32 mins 1 sec
671 | @ 159 days 17 hours 32 mins 1 sec
672 | @ 39 days 17 hours 32 mins 1 sec
673 | @ 40 days 17 hours 32 mins 1 sec
674 | @ 41 days 17 hours 32 mins 1 sec
675 | @ 42 days 17 hours 32 mins 1 sec
676 | @ 43 days 17 hours 32 mins 1 sec
677 | @ 44 days 17 hours 32 mins 1 sec
678 | @ 45 days 17 hours 32 mins 1 sec
679 | @ 45 days 17 hours 32 mins 1 sec
680 | @ 308 days 6 hours 27 mins 59 secs ago
681 | @ 307 days 6 hours 27 mins 59 secs ago
682 | @ 306 days 6 hours 27 mins 59 secs ago
683 | @ 2 days 6 hours 27 mins 59 secs ago
684 | @ 1 day 6 hours 27 mins 59 secs ago
685 | @ 6 hours 27 mins 59 secs ago
686 | @ 57 days 17 hours 32 mins 1 sec
687 | @ 58 days 17 hours 32 mins 1 sec
688 | @ 362 days 17 hours 32 mins 1 sec
689 | @ 363 days 17 hours 32 mins 1 sec
690 | @ 1093 days 17 hours 32 mins 1 sec
691 | @ 1094 days 17 hours 32 mins 1 sec
692 | @ 1459 days 17 hours 32 mins 1 sec
693 | @ 1460 days 17 hours 32 mins 1 sec
696 SELECT '' AS "54", d1 as timestamptz,
697 date_part( 'year', d1) AS year, date_part( 'month', d1) AS month,
698 date_part( 'day', d1) AS day, date_part( 'hour', d1) AS hour,
699 date_part( 'minute', d1) AS minute, date_part( 'second', d1) AS second
700 FROM TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
701 54 | timestamptz | year | month | day | hour | minute | second
702 ----+--------------------------------+------+-------+-----+------+--------+--------
703 | Wed Dec 31 16:00:00 1969 PST | 1969 | 12 | 31 | 16 | 0 | 0
704 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
705 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
706 | Mon Feb 10 17:32:02 1997 PST | 1997 | 2 | 10 | 17 | 32 | 2
707 | Mon Feb 10 17:32:01.4 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1.4
708 | Mon Feb 10 17:32:01.5 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1.5
709 | Mon Feb 10 17:32:01.6 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1.6
710 | Thu Jan 02 00:00:00 1997 PST | 1997 | 1 | 2 | 0 | 0 | 0
711 | Thu Jan 02 03:04:05 1997 PST | 1997 | 1 | 2 | 3 | 4 | 5
712 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
713 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
714 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
715 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
716 | Tue Jun 10 17:32:01 1997 PDT | 1997 | 6 | 10 | 17 | 32 | 1
717 | Sat Sep 22 18:19:20 2001 PDT | 2001 | 9 | 22 | 18 | 19 | 20
718 | Wed Mar 15 08:14:01 2000 PST | 2000 | 3 | 15 | 8 | 14 | 1
719 | Wed Mar 15 04:14:02 2000 PST | 2000 | 3 | 15 | 4 | 14 | 2
720 | Wed Mar 15 02:14:03 2000 PST | 2000 | 3 | 15 | 2 | 14 | 3
721 | Wed Mar 15 03:14:04 2000 PST | 2000 | 3 | 15 | 3 | 14 | 4
722 | Wed Mar 15 01:14:05 2000 PST | 2000 | 3 | 15 | 1 | 14 | 5
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:00 1997 PST | 1997 | 2 | 10 | 17 | 32 | 0
726 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
727 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
728 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
729 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
730 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
731 | Mon Feb 10 09:32:01 1997 PST | 1997 | 2 | 10 | 9 | 32 | 1
732 | Mon Feb 10 09:32:01 1997 PST | 1997 | 2 | 10 | 9 | 32 | 1
733 | Mon Feb 10 09:32:01 1997 PST | 1997 | 2 | 10 | 9 | 32 | 1
734 | Mon Feb 10 14:32:01 1997 PST | 1997 | 2 | 10 | 14 | 32 | 1
735 | Thu Jul 10 14:32:01 1997 PDT | 1997 | 7 | 10 | 14 | 32 | 1
736 | Tue Jun 10 18:32:01 1997 PDT | 1997 | 6 | 10 | 18 | 32 | 1
737 | Mon Feb 10 17:32:01 1997 PST | 1997 | 2 | 10 | 17 | 32 | 1
738 | Tue Feb 11 17:32:01 1997 PST | 1997 | 2 | 11 | 17 | 32 | 1
739 | Wed Feb 12 17:32:01 1997 PST | 1997 | 2 | 12 | 17 | 32 | 1
740 | Thu Feb 13 17:32:01 1997 PST | 1997 | 2 | 13 | 17 | 32 | 1
741 | Fri Feb 14 17:32:01 1997 PST | 1997 | 2 | 14 | 17 | 32 | 1
742 | Sat Feb 15 17:32:01 1997 PST | 1997 | 2 | 15 | 17 | 32 | 1
743 | Sun Feb 16 17:32:01 1997 PST | 1997 | 2 | 16 | 17 | 32 | 1
744 | Sun Feb 16 17:32:01 1997 PST | 1997 | 2 | 16 | 17 | 32 | 1
745 | Wed Feb 28 17:32:01 1996 PST | 1996 | 2 | 28 | 17 | 32 | 1
746 | Thu Feb 29 17:32:01 1996 PST | 1996 | 2 | 29 | 17 | 32 | 1
747 | Fri Mar 01 17:32:01 1996 PST | 1996 | 3 | 1 | 17 | 32 | 1
748 | Mon Dec 30 17:32:01 1996 PST | 1996 | 12 | 30 | 17 | 32 | 1
749 | Tue Dec 31 17:32:01 1996 PST | 1996 | 12 | 31 | 17 | 32 | 1
750 | Wed Jan 01 17:32:01 1997 PST | 1997 | 1 | 1 | 17 | 32 | 1
751 | Fri Feb 28 17:32:01 1997 PST | 1997 | 2 | 28 | 17 | 32 | 1
752 | Sat Mar 01 17:32:01 1997 PST | 1997 | 3 | 1 | 17 | 32 | 1
753 | Tue Dec 30 17:32:01 1997 PST | 1997 | 12 | 30 | 17 | 32 | 1
754 | Wed Dec 31 17:32:01 1997 PST | 1997 | 12 | 31 | 17 | 32 | 1
755 | Fri Dec 31 17:32:01 1999 PST | 1999 | 12 | 31 | 17 | 32 | 1
756 | Sat Jan 01 17:32:01 2000 PST | 2000 | 1 | 1 | 17 | 32 | 1
757 | Sun Dec 31 17:32:01 2000 PST | 2000 | 12 | 31 | 17 | 32 | 1
758 | Mon Jan 01 17:32:01 2001 PST | 2001 | 1 | 1 | 17 | 32 | 1
761 SELECT '' AS "54", d1 as timestamptz,
762 date_part( 'quarter', d1) AS quarter, date_part( 'msec', d1) AS msec,
763 date_part( 'usec', d1) AS usec
764 FROM TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
765 54 | timestamptz | quarter | msec | usec
766 ----+--------------------------------+---------+-------+----------
767 | Wed Dec 31 16:00:00 1969 PST | 4 | 0 | 0
768 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
769 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
770 | Mon Feb 10 17:32:02 1997 PST | 1 | 2000 | 2000000
771 | Mon Feb 10 17:32:01.4 1997 PST | 1 | 1400 | 1400000
772 | Mon Feb 10 17:32:01.5 1997 PST | 1 | 1500 | 1500000
773 | Mon Feb 10 17:32:01.6 1997 PST | 1 | 1600 | 1600000
774 | Thu Jan 02 00:00:00 1997 PST | 1 | 0 | 0
775 | Thu Jan 02 03:04:05 1997 PST | 1 | 5000 | 5000000
776 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
777 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
778 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
779 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
780 | Tue Jun 10 17:32:01 1997 PDT | 2 | 1000 | 1000000
781 | Sat Sep 22 18:19:20 2001 PDT | 3 | 20000 | 20000000
782 | Wed Mar 15 08:14:01 2000 PST | 1 | 1000 | 1000000
783 | Wed Mar 15 04:14:02 2000 PST | 1 | 2000 | 2000000
784 | Wed Mar 15 02:14:03 2000 PST | 1 | 3000 | 3000000
785 | Wed Mar 15 03:14:04 2000 PST | 1 | 4000 | 4000000
786 | Wed Mar 15 01:14:05 2000 PST | 1 | 5000 | 5000000
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:00 1997 PST | 1 | 0 | 0
790 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
791 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
792 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
793 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
794 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
795 | Mon Feb 10 09:32:01 1997 PST | 1 | 1000 | 1000000
796 | Mon Feb 10 09:32:01 1997 PST | 1 | 1000 | 1000000
797 | Mon Feb 10 09:32:01 1997 PST | 1 | 1000 | 1000000
798 | Mon Feb 10 14:32:01 1997 PST | 1 | 1000 | 1000000
799 | Thu Jul 10 14:32:01 1997 PDT | 3 | 1000 | 1000000
800 | Tue Jun 10 18:32:01 1997 PDT | 2 | 1000 | 1000000
801 | Mon Feb 10 17:32:01 1997 PST | 1 | 1000 | 1000000
802 | Tue Feb 11 17:32:01 1997 PST | 1 | 1000 | 1000000
803 | Wed Feb 12 17:32:01 1997 PST | 1 | 1000 | 1000000
804 | Thu Feb 13 17:32:01 1997 PST | 1 | 1000 | 1000000
805 | Fri Feb 14 17:32:01 1997 PST | 1 | 1000 | 1000000
806 | Sat Feb 15 17:32:01 1997 PST | 1 | 1000 | 1000000
807 | Sun Feb 16 17:32:01 1997 PST | 1 | 1000 | 1000000
808 | Sun Feb 16 17:32:01 1997 PST | 1 | 1000 | 1000000
809 | Wed Feb 28 17:32:01 1996 PST | 1 | 1000 | 1000000
810 | Thu Feb 29 17:32:01 1996 PST | 1 | 1000 | 1000000
811 | Fri Mar 01 17:32:01 1996 PST | 1 | 1000 | 1000000
812 | Mon Dec 30 17:32:01 1996 PST | 4 | 1000 | 1000000
813 | Tue Dec 31 17:32:01 1996 PST | 4 | 1000 | 1000000
814 | Wed Jan 01 17:32:01 1997 PST | 1 | 1000 | 1000000
815 | Fri Feb 28 17:32:01 1997 PST | 1 | 1000 | 1000000
816 | Sat Mar 01 17:32:01 1997 PST | 1 | 1000 | 1000000
817 | Tue Dec 30 17:32:01 1997 PST | 4 | 1000 | 1000000
818 | Wed Dec 31 17:32:01 1997 PST | 4 | 1000 | 1000000
819 | Fri Dec 31 17:32:01 1999 PST | 4 | 1000 | 1000000
820 | Sat Jan 01 17:32:01 2000 PST | 1 | 1000 | 1000000
821 | Sun Dec 31 17:32:01 2000 PST | 4 | 1000 | 1000000
822 | Mon Jan 01 17:32:01 2001 PST | 1 | 1000 | 1000000
825 SELECT '' AS "54", d1 as timestamptz,
826 date_part( 'isoyear', d1) AS isoyear, date_part( 'week', d1) AS week,
827 date_part( 'dow', d1) AS dow
828 FROM TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
829 54 | timestamptz | isoyear | week | dow
830 ----+--------------------------------+---------+------+-----
831 | Wed Dec 31 16:00:00 1969 PST | 1970 | 1 | 3
832 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
833 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
834 | Mon Feb 10 17:32:02 1997 PST | 1997 | 7 | 1
835 | Mon Feb 10 17:32:01.4 1997 PST | 1997 | 7 | 1
836 | Mon Feb 10 17:32:01.5 1997 PST | 1997 | 7 | 1
837 | Mon Feb 10 17:32:01.6 1997 PST | 1997 | 7 | 1
838 | Thu Jan 02 00:00:00 1997 PST | 1997 | 1 | 4
839 | Thu Jan 02 03:04:05 1997 PST | 1997 | 1 | 4
840 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
841 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
842 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
843 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
844 | Tue Jun 10 17:32:01 1997 PDT | 1997 | 24 | 2
845 | Sat Sep 22 18:19:20 2001 PDT | 2001 | 38 | 6
846 | Wed Mar 15 08:14:01 2000 PST | 2000 | 11 | 3
847 | Wed Mar 15 04:14:02 2000 PST | 2000 | 11 | 3
848 | Wed Mar 15 02:14:03 2000 PST | 2000 | 11 | 3
849 | Wed Mar 15 03:14:04 2000 PST | 2000 | 11 | 3
850 | Wed Mar 15 01:14:05 2000 PST | 2000 | 11 | 3
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:00 1997 PST | 1997 | 7 | 1
854 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
855 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
856 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
857 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
858 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
859 | Mon Feb 10 09:32:01 1997 PST | 1997 | 7 | 1
860 | Mon Feb 10 09:32:01 1997 PST | 1997 | 7 | 1
861 | Mon Feb 10 09:32:01 1997 PST | 1997 | 7 | 1
862 | Mon Feb 10 14:32:01 1997 PST | 1997 | 7 | 1
863 | Thu Jul 10 14:32:01 1997 PDT | 1997 | 28 | 4
864 | Tue Jun 10 18:32:01 1997 PDT | 1997 | 24 | 2
865 | Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
866 | Tue Feb 11 17:32:01 1997 PST | 1997 | 7 | 2
867 | Wed Feb 12 17:32:01 1997 PST | 1997 | 7 | 3
868 | Thu Feb 13 17:32:01 1997 PST | 1997 | 7 | 4
869 | Fri Feb 14 17:32:01 1997 PST | 1997 | 7 | 5
870 | Sat Feb 15 17:32:01 1997 PST | 1997 | 7 | 6
871 | Sun Feb 16 17:32:01 1997 PST | 1997 | 7 | 0
872 | Sun Feb 16 17:32:01 1997 PST | 1997 | 7 | 0
873 | Wed Feb 28 17:32:01 1996 PST | 1996 | 9 | 3
874 | Thu Feb 29 17:32:01 1996 PST | 1996 | 9 | 4
875 | Fri Mar 01 17:32:01 1996 PST | 1996 | 9 | 5
876 | Mon Dec 30 17:32:01 1996 PST | 1997 | 1 | 1
877 | Tue Dec 31 17:32:01 1996 PST | 1997 | 1 | 2
878 | Wed Jan 01 17:32:01 1997 PST | 1997 | 1 | 3
879 | Fri Feb 28 17:32:01 1997 PST | 1997 | 9 | 5
880 | Sat Mar 01 17:32:01 1997 PST | 1997 | 9 | 6
881 | Tue Dec 30 17:32:01 1997 PST | 1998 | 1 | 2
882 | Wed Dec 31 17:32:01 1997 PST | 1998 | 1 | 3
883 | Fri Dec 31 17:32:01 1999 PST | 1999 | 52 | 5
884 | Sat Jan 01 17:32:01 2000 PST | 1999 | 52 | 6
885 | Sun Dec 31 17:32:01 2000 PST | 2000 | 52 | 0
886 | Mon Jan 01 17:32:01 2001 PST | 2001 | 1 | 1
890 SELECT '' AS to_char_1, to_char(d1, 'DAY Day day DY Dy dy MONTH Month month RM MON Mon mon')
891 FROM TIMESTAMPTZ_TBL;
893 -----------+------------------------------------------------------------------------------------------
896 | WEDNESDAY Wednesday wednesday WED Wed wed DECEMBER December december XII DEC Dec dec
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 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
900 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
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 | THURSDAY Thursday thursday THU Thu thu JANUARY January january I JAN Jan jan
904 | THURSDAY Thursday thursday THU Thu thu JANUARY January january I JAN Jan jan
905 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
906 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
907 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
908 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
909 | TUESDAY Tuesday tuesday TUE Tue tue JUNE June june VI JUN Jun jun
910 | SATURDAY Saturday saturday SAT Sat sat SEPTEMBER September september IX SEP Sep sep
911 | WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar
912 | WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar
913 | WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar
914 | WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar
915 | WEDNESDAY Wednesday wednesday WED Wed wed MARCH March march III MAR Mar mar
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 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
925 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
926 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
927 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
928 | THURSDAY Thursday thursday THU Thu thu JULY July july VII JUL Jul jul
929 | TUESDAY Tuesday tuesday TUE Tue tue JUNE June june VI JUN Jun jun
930 | MONDAY Monday monday MON Mon mon FEBRUARY February february II FEB Feb feb
931 | TUESDAY Tuesday tuesday TUE Tue tue FEBRUARY February february II FEB Feb feb
932 | WEDNESDAY Wednesday wednesday WED Wed wed FEBRUARY February february II FEB Feb feb
933 | THURSDAY Thursday thursday THU Thu thu FEBRUARY February february II FEB Feb feb
934 | FRIDAY Friday friday FRI Fri fri FEBRUARY February february II FEB Feb feb
935 | SATURDAY Saturday saturday SAT Sat sat FEBRUARY February february II FEB Feb feb
936 | SUNDAY Sunday sunday SUN Sun sun FEBRUARY February february II FEB Feb feb
937 | TUESDAY Tuesday tuesday TUE Tue tue FEBRUARY February february II FEB Feb feb
938 | SATURDAY Saturday saturday SAT Sat sat FEBRUARY February february II FEB Feb feb
939 | THURSDAY Thursday thursday THU Thu thu FEBRUARY February february II FEB Feb feb
940 | TUESDAY Tuesday tuesday TUE Tue tue FEBRUARY February february II FEB Feb feb
941 | SATURDAY Saturday saturday SAT Sat sat FEBRUARY February february II FEB Feb feb
942 | THURSDAY Thursday thursday THU Thu thu FEBRUARY February february II FEB Feb feb
943 | TUESDAY Tuesday tuesday TUE Tue tue FEBRUARY February february II FEB Feb feb
944 | SUNDAY Sunday sunday SUN Sun sun FEBRUARY February february II FEB Feb feb
945 | SATURDAY Saturday saturday SAT Sat sat FEBRUARY February february II FEB Feb feb
946 | WEDNESDAY Wednesday wednesday WED Wed wed FEBRUARY February february II FEB Feb feb
947 | THURSDAY Thursday thursday THU Thu thu FEBRUARY February february II FEB Feb feb
948 | FRIDAY Friday friday FRI Fri fri MARCH March march III MAR Mar mar
949 | MONDAY Monday monday MON Mon mon DECEMBER December december XII DEC Dec dec
950 | TUESDAY Tuesday tuesday TUE Tue tue DECEMBER December december XII DEC Dec dec
951 | WEDNESDAY Wednesday wednesday WED Wed wed JANUARY January january I JAN Jan jan
952 | FRIDAY Friday friday FRI Fri fri FEBRUARY February february II FEB Feb feb
953 | SATURDAY Saturday saturday SAT Sat sat MARCH March march III MAR Mar mar
954 | TUESDAY Tuesday tuesday TUE Tue tue DECEMBER December december XII DEC Dec dec
955 | WEDNESDAY Wednesday wednesday WED Wed wed DECEMBER December december XII DEC Dec dec
956 | FRIDAY Friday friday FRI Fri fri DECEMBER December december XII DEC Dec dec
957 | SATURDAY Saturday saturday SAT Sat sat JANUARY January january I JAN Jan jan
958 | SUNDAY Sunday sunday SUN Sun sun DECEMBER December december XII DEC Dec dec
959 | MONDAY Monday monday MON Mon mon JANUARY January january I JAN Jan jan
963 SELECT '' AS to_char_2, to_char(d1, 'FMDAY FMDay FMday FMMONTH FMMonth FMmonth FMRM')
964 FROM TIMESTAMPTZ_TBL;
966 -----------+--------------------------------------------------------------
969 | WEDNESDAY Wednesday wednesday DECEMBER December december XII
970 | MONDAY Monday monday FEBRUARY February february II
971 | MONDAY Monday monday FEBRUARY February february II
972 | MONDAY Monday monday FEBRUARY February february II
973 | MONDAY Monday monday FEBRUARY February february II
974 | MONDAY Monday monday FEBRUARY February february II
975 | MONDAY Monday monday FEBRUARY February february II
976 | THURSDAY Thursday thursday JANUARY January january I
977 | THURSDAY Thursday thursday JANUARY January january I
978 | MONDAY Monday monday FEBRUARY February february II
979 | MONDAY Monday monday FEBRUARY February february II
980 | MONDAY Monday monday FEBRUARY February february II
981 | MONDAY Monday monday FEBRUARY February february II
982 | TUESDAY Tuesday tuesday JUNE June june VI
983 | SATURDAY Saturday saturday SEPTEMBER September september IX
984 | WEDNESDAY Wednesday wednesday MARCH March march III
985 | WEDNESDAY Wednesday wednesday MARCH March march III
986 | WEDNESDAY Wednesday wednesday MARCH March march III
987 | WEDNESDAY Wednesday wednesday MARCH March march III
988 | WEDNESDAY Wednesday wednesday MARCH March march III
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 | MONDAY Monday monday FEBRUARY February february II
998 | MONDAY Monday monday FEBRUARY February february II
999 | MONDAY Monday monday FEBRUARY February february II
1000 | MONDAY Monday monday FEBRUARY February february II
1001 | THURSDAY Thursday thursday JULY July july VII
1002 | TUESDAY Tuesday tuesday JUNE June june VI
1003 | MONDAY Monday monday FEBRUARY February february II
1004 | TUESDAY Tuesday tuesday FEBRUARY February february II
1005 | WEDNESDAY Wednesday wednesday FEBRUARY February february II
1006 | THURSDAY Thursday thursday FEBRUARY February february II
1007 | FRIDAY Friday friday FEBRUARY February february II
1008 | SATURDAY Saturday saturday FEBRUARY February february II
1009 | SUNDAY Sunday sunday FEBRUARY February february II
1010 | TUESDAY Tuesday tuesday FEBRUARY February february II
1011 | SATURDAY Saturday saturday FEBRUARY February february II
1012 | THURSDAY Thursday thursday FEBRUARY February february II
1013 | TUESDAY Tuesday tuesday FEBRUARY February february II
1014 | SATURDAY Saturday saturday FEBRUARY February february II
1015 | THURSDAY Thursday thursday FEBRUARY February february II
1016 | TUESDAY Tuesday tuesday FEBRUARY February february II
1017 | SUNDAY Sunday sunday FEBRUARY February february II
1018 | SATURDAY Saturday saturday FEBRUARY February february II
1019 | WEDNESDAY Wednesday wednesday FEBRUARY February february II
1020 | THURSDAY Thursday thursday FEBRUARY February february II
1021 | FRIDAY Friday friday MARCH March march III
1022 | MONDAY Monday monday DECEMBER December december XII
1023 | TUESDAY Tuesday tuesday DECEMBER December december XII
1024 | WEDNESDAY Wednesday wednesday JANUARY January january I
1025 | FRIDAY Friday friday FEBRUARY February february II
1026 | SATURDAY Saturday saturday MARCH March march III
1027 | TUESDAY Tuesday tuesday DECEMBER December december XII
1028 | WEDNESDAY Wednesday wednesday DECEMBER December december XII
1029 | FRIDAY Friday friday DECEMBER December december XII
1030 | SATURDAY Saturday saturday JANUARY January january I
1031 | SUNDAY Sunday sunday DECEMBER December december XII
1032 | MONDAY Monday monday JANUARY January january I
1035 SELECT '' AS to_char_3, to_char(d1, 'Y,YYY YYYY YYY YY Y CC Q MM WW DDD DD D J')
1036 FROM TIMESTAMPTZ_TBL;
1038 -----------+-------------------------------------------------
1041 | 1,969 1969 969 69 9 20 4 12 53 365 31 4 2440587
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 02 06 041 10 2 2450490
1045 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
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 01 01 002 02 5 2450451
1049 | 1,997 1997 997 97 7 20 1 01 01 002 02 5 2450451
1050 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1051 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1052 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1053 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1054 | 1,997 1997 997 97 7 20 2 06 23 161 10 3 2450610
1055 | 2,001 2001 001 01 1 21 3 09 38 265 22 7 2452175
1056 | 2,000 2000 000 00 0 20 1 03 11 075 15 4 2451619
1057 | 2,000 2000 000 00 0 20 1 03 11 075 15 4 2451619
1058 | 2,000 2000 000 00 0 20 1 03 11 075 15 4 2451619
1059 | 2,000 2000 000 00 0 20 1 03 11 075 15 4 2451619
1060 | 2,000 2000 000 00 0 20 1 03 11 075 15 4 2451619
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 1 02 06 041 10 2 2450490
1070 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
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 041 10 2 2450490
1073 | 1,997 1997 997 97 7 20 3 07 28 191 10 5 2450640
1074 | 1,997 1997 997 97 7 20 2 06 23 161 10 3 2450610
1075 | 1,997 1997 997 97 7 20 1 02 06 041 10 2 2450490
1076 | 1,997 1997 997 97 7 20 1 02 06 042 11 3 2450491
1077 | 1,997 1997 997 97 7 20 1 02 07 043 12 4 2450492
1078 | 1,997 1997 997 97 7 20 1 02 07 044 13 5 2450493
1079 | 1,997 1997 997 97 7 20 1 02 07 045 14 6 2450494
1080 | 1,997 1997 997 97 7 20 1 02 07 046 15 7 2450495
1081 | 1,997 1997 997 97 7 20 1 02 07 047 16 1 2450496
1082 | 0,097 0097 097 97 7 01 1 02 07 047 16 3 1686042
1083 | 0,097 0097 097 97 7 01 1 02 07 047 16 7 1756536
1084 | 0,597 0597 597 97 7 06 1 02 07 047 16 5 1939157
1085 | 1,097 1097 097 97 7 11 1 02 07 047 16 3 2121778
1086 | 1,697 1697 697 97 7 17 1 02 07 047 16 7 2340924
1087 | 1,797 1797 797 97 7 18 1 02 07 047 16 5 2377448
1088 | 1,897 1897 897 97 7 19 1 02 07 047 16 3 2413972
1089 | 1,997 1997 997 97 7 20 1 02 07 047 16 1 2450496
1090 | 2,097 2097 097 97 7 21 1 02 07 047 16 7 2487021
1091 | 1,996 1996 996 96 6 20 1 02 09 059 28 4 2450142
1092 | 1,996 1996 996 96 6 20 1 02 09 060 29 5 2450143
1093 | 1,996 1996 996 96 6 20 1 03 09 061 01 6 2450144
1094 | 1,996 1996 996 96 6 20 4 12 53 365 30 2 2450448
1095 | 1,996 1996 996 96 6 20 4 12 53 366 31 3 2450449
1096 | 1,997 1997 997 97 7 20 1 01 01 001 01 4 2450450
1097 | 1,997 1997 997 97 7 20 1 02 09 059 28 6 2450508
1098 | 1,997 1997 997 97 7 20 1 03 09 060 01 7 2450509
1099 | 1,997 1997 997 97 7 20 4 12 52 364 30 3 2450813
1100 | 1,997 1997 997 97 7 20 4 12 53 365 31 4 2450814
1101 | 1,999 1999 999 99 9 20 4 12 53 365 31 6 2451544
1102 | 2,000 2000 000 00 0 20 1 01 01 001 01 7 2451545
1103 | 2,000 2000 000 00 0 20 4 12 53 366 31 1 2451910
1104 | 2,001 2001 001 01 1 21 1 01 01 001 01 2 2451911
1108 SELECT '' AS to_char_4, to_char(d1, 'FMY,YYY FMYYYY FMYYY FMYY FMY FMCC FMQ FMMM FMWW FMDDD FMDD FMD FMJ')
1109 FROM TIMESTAMPTZ_TBL;
1111 -----------+-------------------------------------------------
1114 | 1,969 1969 969 69 9 20 4 12 53 365 31 4 2440587
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 2 6 41 10 2 2450490
1118 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
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 1 1 2 2 5 2450451
1122 | 1,997 1997 997 97 7 20 1 1 1 2 2 5 2450451
1123 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1124 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1125 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1126 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1127 | 1,997 1997 997 97 7 20 2 6 23 161 10 3 2450610
1128 | 2,001 2001 001 01 1 21 3 9 38 265 22 7 2452175
1129 | 2,000 2000 000 00 0 20 1 3 11 75 15 4 2451619
1130 | 2,000 2000 000 00 0 20 1 3 11 75 15 4 2451619
1131 | 2,000 2000 000 00 0 20 1 3 11 75 15 4 2451619
1132 | 2,000 2000 000 00 0 20 1 3 11 75 15 4 2451619
1133 | 2,000 2000 000 00 0 20 1 3 11 75 15 4 2451619
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 1 2 6 41 10 2 2450490
1143 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
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 41 10 2 2450490
1146 | 1,997 1997 997 97 7 20 3 7 28 191 10 5 2450640
1147 | 1,997 1997 997 97 7 20 2 6 23 161 10 3 2450610
1148 | 1,997 1997 997 97 7 20 1 2 6 41 10 2 2450490
1149 | 1,997 1997 997 97 7 20 1 2 6 42 11 3 2450491
1150 | 1,997 1997 997 97 7 20 1 2 7 43 12 4 2450492
1151 | 1,997 1997 997 97 7 20 1 2 7 44 13 5 2450493
1152 | 1,997 1997 997 97 7 20 1 2 7 45 14 6 2450494
1153 | 1,997 1997 997 97 7 20 1 2 7 46 15 7 2450495
1154 | 1,997 1997 997 97 7 20 1 2 7 47 16 1 2450496
1155 | 0,097 97 097 97 7 1 1 2 7 47 16 3 1686042
1156 | 0,097 97 097 97 7 1 1 2 7 47 16 7 1756536
1157 | 0,597 597 597 97 7 6 1 2 7 47 16 5 1939157
1158 | 1,097 1097 097 97 7 11 1 2 7 47 16 3 2121778
1159 | 1,697 1697 697 97 7 17 1 2 7 47 16 7 2340924
1160 | 1,797 1797 797 97 7 18 1 2 7 47 16 5 2377448
1161 | 1,897 1897 897 97 7 19 1 2 7 47 16 3 2413972
1162 | 1,997 1997 997 97 7 20 1 2 7 47 16 1 2450496
1163 | 2,097 2097 097 97 7 21 1 2 7 47 16 7 2487021
1164 | 1,996 1996 996 96 6 20 1 2 9 59 28 4 2450142
1165 | 1,996 1996 996 96 6 20 1 2 9 60 29 5 2450143
1166 | 1,996 1996 996 96 6 20 1 3 9 61 1 6 2450144
1167 | 1,996 1996 996 96 6 20 4 12 53 365 30 2 2450448
1168 | 1,996 1996 996 96 6 20 4 12 53 366 31 3 2450449
1169 | 1,997 1997 997 97 7 20 1 1 1 1 1 4 2450450
1170 | 1,997 1997 997 97 7 20 1 2 9 59 28 6 2450508
1171 | 1,997 1997 997 97 7 20 1 3 9 60 1 7 2450509
1172 | 1,997 1997 997 97 7 20 4 12 52 364 30 3 2450813
1173 | 1,997 1997 997 97 7 20 4 12 53 365 31 4 2450814
1174 | 1,999 1999 999 99 9 20 4 12 53 365 31 6 2451544
1175 | 2,000 2000 000 00 0 20 1 1 1 1 1 7 2451545
1176 | 2,000 2000 000 00 0 20 4 12 53 366 31 1 2451910
1177 | 2,001 2001 001 01 1 21 1 1 1 1 1 2 2451911
1181 SELECT '' AS to_char_5, to_char(d1, 'HH HH12 HH24 MI SS SSSS')
1182 FROM TIMESTAMPTZ_TBL;
1184 -----------+----------------------
1187 | 04 04 16 00 00 57600
1188 | 05 05 17 32 01 63121
1189 | 05 05 17 32 01 63121
1190 | 05 05 17 32 02 63122
1191 | 05 05 17 32 01 63121
1192 | 05 05 17 32 01 63121
1193 | 05 05 17 32 01 63121
1195 | 03 03 03 04 05 11045
1196 | 05 05 17 32 01 63121
1197 | 05 05 17 32 01 63121
1198 | 05 05 17 32 01 63121
1199 | 05 05 17 32 01 63121
1200 | 05 05 17 32 01 63121
1201 | 06 06 18 19 20 65960
1202 | 08 08 08 14 01 29641
1203 | 04 04 04 14 02 15242
1204 | 02 02 02 14 03 8043
1205 | 03 03 03 14 04 11644
1206 | 01 01 01 14 05 4445
1207 | 05 05 17 32 01 63121
1208 | 05 05 17 32 01 63121
1209 | 05 05 17 32 00 63120
1210 | 05 05 17 32 01 63121
1211 | 05 05 17 32 01 63121
1212 | 05 05 17 32 01 63121
1213 | 05 05 17 32 01 63121
1214 | 05 05 17 32 01 63121
1215 | 09 09 09 32 01 34321
1216 | 09 09 09 32 01 34321
1217 | 09 09 09 32 01 34321
1218 | 02 02 14 32 01 52321
1219 | 02 02 14 32 01 52321
1220 | 06 06 18 32 01 66721
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
1247 | 05 05 17 32 01 63121
1248 | 05 05 17 32 01 63121
1249 | 05 05 17 32 01 63121
1250 | 05 05 17 32 01 63121
1253 SELECT '' AS to_char_6, to_char(d1, E'"HH:MI:SS is" HH:MI:SS "\\"text between quote marks\\""')
1254 FROM TIMESTAMPTZ_TBL;
1256 -----------+-------------------------------------------------
1259 | HH:MI:SS is 04:00:00 "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 05:32:02 "text between quote marks"
1263 | HH:MI:SS is 05:32:01 "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 12:00:00 "text between quote marks"
1267 | HH:MI:SS is 03:04:05 "text between quote marks"
1268 | HH:MI:SS is 05:32:01 "text between quote marks"
1269 | HH:MI:SS is 05:32:01 "text between quote marks"
1270 | HH:MI:SS is 05:32:01 "text between quote marks"
1271 | HH:MI:SS is 05:32:01 "text between quote marks"
1272 | HH:MI:SS is 05:32:01 "text between quote marks"
1273 | HH:MI:SS is 06:19:20 "text between quote marks"
1274 | HH:MI:SS is 08:14:01 "text between quote marks"
1275 | HH:MI:SS is 04:14:02 "text between quote marks"
1276 | HH:MI:SS is 02:14:03 "text between quote marks"
1277 | HH:MI:SS is 03:14:04 "text between quote marks"
1278 | HH:MI:SS is 01:14:05 "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:00 "text between quote marks"
1282 | HH:MI:SS is 05:32:01 "text between quote marks"
1283 | HH:MI:SS is 05:32:01 "text between quote marks"
1284 | HH:MI:SS is 05:32:01 "text between quote marks"
1285 | HH:MI:SS is 05:32:01 "text between quote marks"
1286 | HH:MI:SS is 05:32:01 "text between quote marks"
1287 | HH:MI:SS is 09:32:01 "text between quote marks"
1288 | HH:MI:SS is 09:32:01 "text between quote marks"
1289 | HH:MI:SS is 09:32:01 "text between quote marks"
1290 | HH:MI:SS is 02:32:01 "text between quote marks"
1291 | HH:MI:SS is 02:32:01 "text between quote marks"
1292 | HH:MI:SS is 06: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"
1319 | HH:MI:SS is 05:32:01 "text between quote marks"
1320 | HH:MI:SS is 05:32:01 "text between quote marks"
1321 | HH:MI:SS is 05:32:01 "text between quote marks"
1322 | HH:MI:SS is 05:32:01 "text between quote marks"
1326 SELECT '' AS to_char_7, to_char(d1, 'HH24--text--MI--text--SS')
1327 FROM TIMESTAMPTZ_TBL;
1329 -----------+------------------------
1332 | 16--text--00--text--00
1333 | 17--text--32--text--01
1334 | 17--text--32--text--01
1335 | 17--text--32--text--02
1336 | 17--text--32--text--01
1337 | 17--text--32--text--01
1338 | 17--text--32--text--01
1339 | 00--text--00--text--00
1340 | 03--text--04--text--05
1341 | 17--text--32--text--01
1342 | 17--text--32--text--01
1343 | 17--text--32--text--01
1344 | 17--text--32--text--01
1345 | 17--text--32--text--01
1346 | 18--text--19--text--20
1347 | 08--text--14--text--01
1348 | 04--text--14--text--02
1349 | 02--text--14--text--03
1350 | 03--text--14--text--04
1351 | 01--text--14--text--05
1352 | 17--text--32--text--01
1353 | 17--text--32--text--01
1354 | 17--text--32--text--00
1355 | 17--text--32--text--01
1356 | 17--text--32--text--01
1357 | 17--text--32--text--01
1358 | 17--text--32--text--01
1359 | 17--text--32--text--01
1360 | 09--text--32--text--01
1361 | 09--text--32--text--01
1362 | 09--text--32--text--01
1363 | 14--text--32--text--01
1364 | 14--text--32--text--01
1365 | 18--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
1392 | 17--text--32--text--01
1393 | 17--text--32--text--01
1394 | 17--text--32--text--01
1395 | 17--text--32--text--01
1398 SELECT '' AS to_char_8, to_char(d1, 'YYYYTH YYYYth Jth')
1399 FROM TIMESTAMPTZ_TBL;
1401 -----------+-------------------------
1404 | 1969TH 1969th 2440587th
1405 | 1997TH 1997th 2450490th
1406 | 1997TH 1997th 2450490th
1407 | 1997TH 1997th 2450490th
1408 | 1997TH 1997th 2450490th
1409 | 1997TH 1997th 2450490th
1410 | 1997TH 1997th 2450490th
1411 | 1997TH 1997th 2450451st
1412 | 1997TH 1997th 2450451st
1413 | 1997TH 1997th 2450490th
1414 | 1997TH 1997th 2450490th
1415 | 1997TH 1997th 2450490th
1416 | 1997TH 1997th 2450490th
1417 | 1997TH 1997th 2450610th
1418 | 2001ST 2001st 2452175th
1419 | 2000TH 2000th 2451619th
1420 | 2000TH 2000th 2451619th
1421 | 2000TH 2000th 2451619th
1422 | 2000TH 2000th 2451619th
1423 | 2000TH 2000th 2451619th
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 2450490th
1433 | 1997TH 1997th 2450490th
1434 | 1997TH 1997th 2450490th
1435 | 1997TH 1997th 2450490th
1436 | 1997TH 1997th 2450640th
1437 | 1997TH 1997th 2450610th
1438 | 1997TH 1997th 2450490th
1439 | 1997TH 1997th 2450491st
1440 | 1997TH 1997th 2450492nd
1441 | 1997TH 1997th 2450493rd
1442 | 1997TH 1997th 2450494th
1443 | 1997TH 1997th 2450495th
1444 | 1997TH 1997th 2450496th
1445 | 0097TH 0097th 1686042nd
1446 | 0097TH 0097th 1756536th
1447 | 0597TH 0597th 1939157th
1448 | 1097TH 1097th 2121778th
1449 | 1697TH 1697th 2340924th
1450 | 1797TH 1797th 2377448th
1451 | 1897TH 1897th 2413972nd
1452 | 1997TH 1997th 2450496th
1453 | 2097TH 2097th 2487021st
1454 | 1996TH 1996th 2450142nd
1455 | 1996TH 1996th 2450143rd
1456 | 1996TH 1996th 2450144th
1457 | 1996TH 1996th 2450448th
1458 | 1996TH 1996th 2450449th
1459 | 1997TH 1997th 2450450th
1460 | 1997TH 1997th 2450508th
1461 | 1997TH 1997th 2450509th
1462 | 1997TH 1997th 2450813th
1463 | 1997TH 1997th 2450814th
1464 | 1999TH 1999th 2451544th
1465 | 2000TH 2000th 2451545th
1466 | 2000TH 2000th 2451910th
1467 | 2001ST 2001st 2451911th
1471 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')
1472 FROM TIMESTAMPTZ_TBL;
1474 -----------+---------------------------------------------------------------------
1477 | 1969 A.D. 1969 a.d. 1969 ad 04:00:00 P.M. 04:00:00 p.m. 04:00:00 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 05:32:02 P.M. 05:32:02 p.m. 05:32:02 pm
1481 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
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 12:00:00 A.M. 12:00:00 a.m. 12:00:00 am
1485 | 1997 A.D. 1997 a.d. 1997 ad 03:04:05 A.M. 03:04:05 a.m. 03:04:05 am
1486 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1487 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1488 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1489 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1490 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1491 | 2001 A.D. 2001 a.d. 2001 ad 06:19:20 P.M. 06:19:20 p.m. 06:19:20 pm
1492 | 2000 A.D. 2000 a.d. 2000 ad 08:14:01 A.M. 08:14:01 a.m. 08:14:01 am
1493 | 2000 A.D. 2000 a.d. 2000 ad 04:14:02 A.M. 04:14:02 a.m. 04:14:02 am
1494 | 2000 A.D. 2000 a.d. 2000 ad 02:14:03 A.M. 02:14:03 a.m. 02:14:03 am
1495 | 2000 A.D. 2000 a.d. 2000 ad 03:14:04 A.M. 03:14:04 a.m. 03:14:04 am
1496 | 2000 A.D. 2000 a.d. 2000 ad 01:14:05 A.M. 01:14:05 a.m. 01:14:05 am
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:00 P.M. 05:32:00 p.m. 05:32:00 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 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1502 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1503 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1504 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1505 | 1997 A.D. 1997 a.d. 1997 ad 09:32:01 A.M. 09:32:01 a.m. 09:32:01 am
1506 | 1997 A.D. 1997 a.d. 1997 ad 09:32:01 A.M. 09:32:01 a.m. 09:32:01 am
1507 | 1997 A.D. 1997 a.d. 1997 ad 09:32:01 A.M. 09:32:01 a.m. 09:32:01 am
1508 | 1997 A.D. 1997 a.d. 1997 ad 02:32:01 P.M. 02:32:01 p.m. 02:32:01 pm
1509 | 1997 A.D. 1997 a.d. 1997 ad 02:32:01 P.M. 02:32:01 p.m. 02:32:01 pm
1510 | 1997 A.D. 1997 a.d. 1997 ad 06:32:01 P.M. 06:32:01 p.m. 06: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 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1515 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1516 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1517 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1518 | 0097 B.C. 0097 b.c. 0097 bc 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1519 | 0097 A.D. 0097 a.d. 0097 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1520 | 0597 A.D. 0597 a.d. 0597 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1521 | 1097 A.D. 1097 a.d. 1097 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1522 | 1697 A.D. 1697 a.d. 1697 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1523 | 1797 A.D. 1797 a.d. 1797 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1524 | 1897 A.D. 1897 a.d. 1897 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1525 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1526 | 2097 A.D. 2097 a.d. 2097 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 | 1996 A.D. 1996 a.d. 1996 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1529 | 1996 A.D. 1996 a.d. 1996 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1530 | 1996 A.D. 1996 a.d. 1996 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1531 | 1996 A.D. 1996 a.d. 1996 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 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1534 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1535 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1536 | 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1537 | 1999 A.D. 1999 a.d. 1999 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1538 | 2000 A.D. 2000 a.d. 2000 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1539 | 2000 A.D. 2000 a.d. 2000 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1540 | 2001 A.D. 2001 a.d. 2001 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
1543 SELECT '' AS to_char_10, to_char(d1, 'IYYY IYY IY I IW IDDD ID')
1544 FROM TIMESTAMPTZ_TBL;
1545 to_char_10 | to_char
1546 ------------+------------------------
1549 | 1970 970 70 0 01 003 3
1550 | 1997 997 97 7 07 043 1
1551 | 1997 997 97 7 07 043 1
1552 | 1997 997 97 7 07 043 1
1553 | 1997 997 97 7 07 043 1
1554 | 1997 997 97 7 07 043 1
1555 | 1997 997 97 7 07 043 1
1556 | 1997 997 97 7 01 004 4
1557 | 1997 997 97 7 01 004 4
1558 | 1997 997 97 7 07 043 1
1559 | 1997 997 97 7 07 043 1
1560 | 1997 997 97 7 07 043 1
1561 | 1997 997 97 7 07 043 1
1562 | 1997 997 97 7 24 163 2
1563 | 2001 001 01 1 38 265 6
1564 | 2000 000 00 0 11 073 3
1565 | 2000 000 00 0 11 073 3
1566 | 2000 000 00 0 11 073 3
1567 | 2000 000 00 0 11 073 3
1568 | 2000 000 00 0 11 073 3
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 07 043 1
1578 | 1997 997 97 7 07 043 1
1579 | 1997 997 97 7 07 043 1
1580 | 1997 997 97 7 07 043 1
1581 | 1997 997 97 7 28 193 4
1582 | 1997 997 97 7 24 163 2
1583 | 1997 997 97 7 07 043 1
1584 | 1997 997 97 7 07 044 2
1585 | 1997 997 97 7 07 045 3
1586 | 1997 997 97 7 07 046 4
1587 | 1997 997 97 7 07 047 5
1588 | 1997 997 97 7 07 048 6
1589 | 1997 997 97 7 07 049 7
1590 | 0097 097 97 7 07 044 2
1591 | 0097 097 97 7 07 048 6
1592 | 0597 597 97 7 07 046 4
1593 | 1097 097 97 7 07 044 2
1594 | 1697 697 97 7 07 048 6
1595 | 1797 797 97 7 07 046 4
1596 | 1897 897 97 7 07 044 2
1597 | 1997 997 97 7 07 049 7
1598 | 2097 097 97 7 07 048 6
1599 | 1996 996 96 6 09 059 3
1600 | 1996 996 96 6 09 060 4
1601 | 1996 996 96 6 09 061 5
1602 | 1997 997 97 7 01 001 1
1603 | 1997 997 97 7 01 002 2
1604 | 1997 997 97 7 01 003 3
1605 | 1997 997 97 7 09 061 5
1606 | 1997 997 97 7 09 062 6
1607 | 1998 998 98 8 01 002 2
1608 | 1998 998 98 8 01 003 3
1609 | 1999 999 99 9 52 362 5
1610 | 1999 999 99 9 52 363 6
1611 | 2000 000 00 0 52 364 7
1612 | 2001 001 01 1 01 001 1
1615 SELECT '' AS to_char_11, to_char(d1, 'FMIYYY FMIYY FMIY FMI FMIW FMIDDD FMID')
1616 FROM TIMESTAMPTZ_TBL;
1617 to_char_11 | to_char
1618 ------------+------------------------
1621 | 1970 970 70 0 1 3 3
1622 | 1997 997 97 7 7 43 1
1623 | 1997 997 97 7 7 43 1
1624 | 1997 997 97 7 7 43 1
1625 | 1997 997 97 7 7 43 1
1626 | 1997 997 97 7 7 43 1
1627 | 1997 997 97 7 7 43 1
1628 | 1997 997 97 7 1 4 4
1629 | 1997 997 97 7 1 4 4
1630 | 1997 997 97 7 7 43 1
1631 | 1997 997 97 7 7 43 1
1632 | 1997 997 97 7 7 43 1
1633 | 1997 997 97 7 7 43 1
1634 | 1997 997 97 7 24 163 2
1635 | 2001 001 01 1 38 265 6
1636 | 2000 000 00 0 11 73 3
1637 | 2000 000 00 0 11 73 3
1638 | 2000 000 00 0 11 73 3
1639 | 2000 000 00 0 11 73 3
1640 | 2000 000 00 0 11 73 3
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 7 43 1
1650 | 1997 997 97 7 7 43 1
1651 | 1997 997 97 7 7 43 1
1652 | 1997 997 97 7 7 43 1
1653 | 1997 997 97 7 28 193 4
1654 | 1997 997 97 7 24 163 2
1655 | 1997 997 97 7 7 43 1
1656 | 1997 997 97 7 7 44 2
1657 | 1997 997 97 7 7 45 3
1658 | 1997 997 97 7 7 46 4
1659 | 1997 997 97 7 7 47 5
1660 | 1997 997 97 7 7 48 6
1661 | 1997 997 97 7 7 49 7
1662 | 97 097 97 7 7 44 2
1663 | 97 097 97 7 7 48 6
1664 | 597 597 97 7 7 46 4
1665 | 1097 097 97 7 7 44 2
1666 | 1697 697 97 7 7 48 6
1667 | 1797 797 97 7 7 46 4
1668 | 1897 897 97 7 7 44 2
1669 | 1997 997 97 7 7 49 7
1670 | 2097 097 97 7 7 48 6
1671 | 1996 996 96 6 9 59 3
1672 | 1996 996 96 6 9 60 4
1673 | 1996 996 96 6 9 61 5
1674 | 1997 997 97 7 1 1 1
1675 | 1997 997 97 7 1 2 2
1676 | 1997 997 97 7 1 3 3
1677 | 1997 997 97 7 9 61 5
1678 | 1997 997 97 7 9 62 6
1679 | 1998 998 98 8 1 2 2
1680 | 1998 998 98 8 1 3 3
1681 | 1999 999 99 9 52 362 5
1682 | 1999 999 99 9 52 363 6
1683 | 2000 000 00 0 52 364 7
1684 | 2001 001 01 1 1 1 1