Search Postgresql Archives

preferred way to use PG_GETARG_BYTEA_P in SPI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm curious what's considered the best way to invoke PG_GETARG_BYTEA_P
in an SPI routine and properly check for null input in non 'strict'
routines.  Right now, I'm looking at PG_GETARG_POINTER to check for
null value before using PG_GETARG_BYTEA_P to assign to the bytea
pointer.

ISTM a little but unintuitive to have PG_GETARG_BYTEA_P crash on null
input...why not just assign null and skip the de-toast call in the
macro?

merlin

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux