List of casts in PostgreSQL

09 May 2005   0 comments   Linux

Powered by Fusion×

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?)


Your email will never ever be published

Related posts

Kingdom of Crap 07 May 2005
Susan Senator's book 11 May 2005
Related by keywords:
Fastest database for Tornado 09 October 2013
Integer division in programming languages 04 August 2004
Optimization of getting random rows out of a PostgreSQL in Django 23 February 2011
Connecting with psycopg2 without a username and password 24 February 2011
Adding a year in PostgreSQL 04 February 2004
pg_class to check if table exists 20 April 2005
To sub-select or not sub-select in PostgreSQL 31 August 2009
Speed test between django_mongokit and postgresql_psycopg2 09 March 2010
Date formatting in python or in PostgreSQL 20 July 2004
PostgreSQL, MySQL or SQLite 04 April 2004
UPPER vs. ILIKE 19 April 2010
Fastest "boolean SQL queries" possible with Django 14 January 2011