Commit d3f2fac
error safe for casting timestamp to other types per pg_cast
select castsource::regtype, casttarget::regtype, castfunc,
castcontext,castmethod, pp.prosrc, pp.proname
from pg_cast pc join pg_proc pp on
pp.oid = pc.castfunc
and pc.castfunc > 0 and (castsource::regtype ='timestamp'::regtype)
order by castsource::regtype;
castsource | casttarget | castfunc | castcontext | castmethod | prosrc | proname
-----------------------------+-----------------------------+----------+-------------+------------+-----------------------+-------------
timestamp without time zone | date | 2029 | a | f | timestamp_date | date
timestamp without time zone | time without time zone | 1316 | a | f | timestamp_time | time
timestamp without time zone | timestamp with time zone | 2028 | i | f | timestamp_timestamptz | timestamptz
timestamp without time zone | timestamp without time zone | 1961 | i | f | timestamp_scale | timestamp
(4 rows)
discussion: https://postgr.es/m/CADkLM=fv1JfY4Ufa-jcwwNbjQixNViskQ8jZu3Tz_p656i_4hQ@mail.gmail.com1 parent 55e963d commit d3f2fac
2 files changed
+13
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1330 | 1330 | | |
1331 | 1331 | | |
1332 | 1332 | | |
1333 | | - | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
1334 | 1337 | | |
1335 | 1338 | | |
1336 | 1339 | | |
| |||
2008 | 2011 | | |
2009 | 2012 | | |
2010 | 2013 | | |
2011 | | - | |
| 2014 | + | |
2012 | 2015 | | |
2013 | 2016 | | |
2014 | 2017 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
355 | | - | |
| 355 | + | |
| 356 | + | |
356 | 357 | | |
357 | 358 | | |
358 | 359 | | |
| |||
6432 | 6433 | | |
6433 | 6434 | | |
6434 | 6435 | | |
| 6436 | + | |
6435 | 6437 | | |
6436 | | - | |
| 6438 | + | |
| 6439 | + | |
| 6440 | + | |
| 6441 | + | |
| 6442 | + | |
6437 | 6443 | | |
6438 | 6444 | | |
6439 | 6445 | | |
| |||
0 commit comments