From: | "Adam Kunen" <adam(dot)kunen(at)gmail(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #3264: SPI: int64's sometimes returned by value sometimes by reference |
Date: | 2007-05-10 05:11:41 |
Message-ID: | 78a1913f0705092211q27b6848as9409b688d97dcf16@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
"Adam Kunen" <adam(dot)kunen(at)gmail(dot)com> writes:
> > I have noticed some discrepencies with 64-bit values in tuples.
> > For a given row with multiple int8's I have noticed sometimes the value
> will
> > be passed by value and sometime by reference.
>
> No, int8 datums are always passed by reference. If you have a
> counterexample then let's see it.
>
> Whether they *could* be passed by value on some platforms is a
> different issue. One of the reasons for having macros like
> DatumGetInt64 is to make such a thing transparent to source code
> when/if we get around to doing it. IMHO, if your code assumes
> either convention explicitly then it's broken.
>
> A possible reading of your report is that you've failed to distinguish
> int4 and int8 datums in places ... but with so few details, it's
> impossible to be sure of that diagnosis.
>
> regards, tom lane
>
Ah, you are right. My apologies, someone switched a serial8 to a serial on
me, and never let me know!
I didn't post my example because it would have been too long, instead I went
thru making a test case for you, only to find out what you already knew!
Thanks anyways,
sorry for wasting your time!
-Adam Kunen
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-05-10 05:15:24 | Re: BUG #3265: 8.1 -> 8.2 behviour change: View owner must have access to underlying tables |
Previous Message | Russell Smith | 2007-05-10 04:53:59 | BUG #3265: 8.1 -> 8.2 behviour change: View owner must have access to underlying tables |