List of casts in PostgreSQL

09 May 2005   0 comments   Linux

Mind That Age!

This blog post is 13 years old! Most likely, its content is outdated. Especially if it's technical.

Learned something new today that will come in very handy next time I'm about to pick up a manual or search the PostgreSQL documentation with Google.

In psql if you run \dC you get a list of casts. Here's the header:

                           List of casts
   Source type    |    Target type    |   Function    | Implicit? 
------------------+-------------------+---------------+-------------

This is very handy when you need to know, for example, which cast to use when to cast a value of type date to timestamp without time zone you use timestamp. Most of these are pretty obvious and the PostgreSQL book is never far away on my desk, but the interesting thing is that I came across this function by accident when running psql.

(was this the most boring thing I've written here in a long time?)

Comments

Thank you for posting a comment

Your email will never ever be published


Related posts

Previous:
Kingdom of Crap 07 May 2005
Next:
Susan Senator's book 11 May 2005
Related by Keyword:
Show size of every PostgreSQL database you have 07 February 2018
Conditional aggregation in Django 2.0 12 January 2018
When Docker is too slow, use your host 11 January 2018
How do log ALL PostgreSQL SQL happening 20 July 2015
Fastest database for Tornado 09 October 2013