Re: Datatyp of a column - Mailing list pgsql-hackers

From Ishaya Bhatt
Subject Re: Datatyp of a column
Date
Msg-id CA+E1M321tKzStUui1yr9ELdKKjG2D84f1-fKfaMsaVGH_hN8Ww@mail.gmail.com
Whole thread Raw
In response to Re: Datatyp of a column  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
<div dir="ltr">Yes!! Thats exactly what I was looking for !! Thanks :)<br /></div><div class="gmail_extra"><br /><br
/><divclass="gmail_quote">On Mon, Nov 11, 2013 at 7:58 PM, Tom Lane <span dir="ltr"><<a
href="mailto:tgl@sss.pgh.pa.us"target="_blank">tgl@sss.pgh.pa.us</a>></span> wrote:<br /><blockquote
class="gmail_quote"style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Ishaya Bhatt
<<ahref="mailto:ishayabhatt@gmail.com">ishayabhatt@gmail.com</a>> writes:<br /> >      In the sorting code, I
needto determine the datatype of my sort keys<br /> > and call some code conditionally based on the datatype. Is
thereany way to<br /></div>> determine the datatype of a column from the *backend* PostGreSQL code. is<br /><div
class="im">>the datatype of the column available in the query plan? Any help on this<br /> > would be very much
appreciated.<br/><br /></div>You really need to be more specific about where you need this information.<br /> The
"sortingcode" certainly knows what datatypes it's working with ---<br /> for example, in tuplesort.c there's a
TupleDescfor the tuples passing<br /> through the sort, and the column types are available from the per-column<br />
atttypidfields of that.  But it's not clear if that's what you're talking<br /> about.<br /><br />                    
   regards, tom lane<br /></blockquote></div><br /></div> 

pgsql-hackers by date:

Previous
From: "Colin 't Hart"
Date:
Subject: Re: TABLE not synonymous with SELECT * FROM?
Next
From: Greg Stark
Date:
Subject: Re: Another bug(?) turned up by the llvm optimization checker