How do I find the function used by postgresql to perform a typecast?
source link: https://www.codesd.com/item/how-do-i-find-the-function-used-by-postgresql-to-perform-a-typecast.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
How do I find the function used by postgresql to perform a typecast?
How would one go about determining the function used by postgresql to perform a type casting?
EG: If I have SELECT '{1,2,3}'::int4[], how do I determine which function is used by postgresql to perform the casting? Doing \dC within psql does not seem to list any casts that have the target data type being int4[].
The totally elite way is to do SET debug_print_parse TO on;
or SET debug_print_plan TO on;
and then look at the parse or plan tree in the server log for which function ends up being called.
In this particular example, this will tell you that what you wrote isn't really a cast, it simply feeds the string '{1,2,3}'
to the type input function of the type int4[]
. There are other scenarios where a cast function as such won't be called, such as binary compatible types or coercion via I/O functions.
Related Articles
How to get / find the function called from a DOM element or a variable in javascript or jquery
How can I find the memory used by my array
How to find the functions used by a particular library in a C ++ file
How do I find the parameters used in k means to create clusters?
How do we return the function using module.exports in nodeJS?
How can you find the URL used in the default initialization of log4j?
How can I find the index using exponential, binary and interpolation search recursively?
How do I find the median using pandas on a dataset?
How can I find the files used by a given process in Windows? Is there software that does that?
How do you find the php file in which a function is defined in wordpress?
How can you find the min number in this function in javascript
How can I find the depth of a recursive function in C ++
How do I find the last six digits of a string using regex in java?
How do I find the index of the first & ldquo; Element & rdquo; In my chain using Java?
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK