Skip site navigation (1) Skip section navigation (2)

python - be: Improve bytea accessors.

From: jwp(at)pgfoundry(dot)org (James William Pye)
To: pgsql-committers(at)postgresql(dot)org
Subject: python - be: Improve bytea accessors.
Date: 2005-12-01 19:26:46
Message-ID: 20051201192646.0A96B112500B@pgfoundry.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Improve bytea accessors.

Primarily, do not assume the Datum is not toasted. Use byteaoctetlen for length
and DatumGetByteaPSlice() for slicing.

(str() should probably return a raw string of the bytea instead of the typoutput
as slicing now returns byteas instead Python StringType. do later, tho)

Modified Files:
--------------
    be/src/type:
        bitwise.c (r1.6 -> r1.7)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/be/src/type/bitwise.c.diff?r1=1.6&r2=1.7)

pgsql-committers by date

Next:From: Bruce MomjianDate: 2005-12-01 20:06:37
Subject: pgsql: Add comments about why errno is set to zero.
Previous:From: Tom LaneDate: 2005-12-01 17:57:08
Subject: pgsql: Check for overflow in strtol() while parsing datetime inputs.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group