On Wed, Sep 16, 2015 at 03:57:04PM -0400, Tom Lane wrote:
> Robert Haas writes:
> > On Wed, Sep 16, 2015 at 3:16 AM, Craig Ringer wrote:
> >> Our implementation of << is a direct wrapper around the C operator. It
> >> does not check the right-hand side's value.
> >> ... On x64 intel gcc linux it
On 2015-09-16 15:57:04 -0400, Tom Lane wrote:
> Robert Haas writes:
> > On Wed, Sep 16, 2015 at 3:16 AM, Craig Ringer wrote:
> >> Our implementation of << is a direct wrapper around the C operator. It
> >> does not check the right-hand side's value.
> >> ... On x64 intel gcc linux it does a rotat
On Wed, Sep 16, 2015 at 3:57 PM, Tom Lane wrote:
> Robert Haas writes:
>> On Wed, Sep 16, 2015 at 3:16 AM, Craig Ringer wrote:
>>> Our implementation of << is a direct wrapper around the C operator. It
>>> does not check the right-hand side's value.
>>> ... On x64 intel gcc linux it does a rotat
Robert Haas writes:
> On Wed, Sep 16, 2015 at 3:16 AM, Craig Ringer wrote:
>> Our implementation of << is a direct wrapper around the C operator. It
>> does not check the right-hand side's value.
>> ... On x64 intel gcc linux it does a rotation but that's
>> not AFAIK guaranteed by anything, and
On Wed, Sep 16, 2015 at 3:16 AM, Craig Ringer wrote:
> Our implementation of << is a direct wrapper around the C operator. It
> does not check the right-hand side's value.
>
> Datum
> int8shl(PG_FUNCTION_ARGS)
> {
> int64 arg1 = PG_GETARG_INT64(0);
> int32
Hello, I don't think so many people have used shift operators
with too-large or negative shift amount relying on the
undetermined behavior.
But if explicit definition is required, I prefer the result of a
shift operation with too-large shift mount is simplly zero. And
shift left with negative shif
Hi all
Our implementation of << is a direct wrapper around the C operator. It
does not check the right-hand side's value.
Datum
int8shl(PG_FUNCTION_ARGS)
{
int64 arg1 = PG_GETARG_INT64(0);
int32 arg2 = PG_GETARG_INT32(1);
PG_RETURN_INT64(a