Valid casts & datatypes?
Valid casts & datatypes?
От:
John McKown <jmckown@prodigy.net>
Дата:
I've been going through the PostgreSQL documentation. I have not been able to find what "casts" are valid. I.e. I can cast an int to a float by putting a ::int4 on the variable name. I cannot cast a datetime to an int. Is there a list of valid casts (from datatype -> to datatype)? Also, it would be nice to have a short explanation of what the valid datatypes are. In particular, I've run across some that I can't really figure out (e.g. tinterval). It would be nice to have a single list of all PostgreSQL datatypes and their ranges and general usage. I know, I know, this is an open source project, so I could try to read the source code and then share what I've found out. But I'm hoping that somebody has already done this, because I'm not all that good at reading C programs. Especially really, really complicated ones like PostgreSQL. John