mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Fix some portability issues (reliance on gcc-isms).
This commit is contained in:
@ -27,11 +27,14 @@ static Oid current_parser_id = InvalidOid;
|
||||
void
|
||||
init_prs(Oid id, WParserInfo * prs)
|
||||
{
|
||||
Oid arg[1] = {OIDOID};
|
||||
Oid arg[1];
|
||||
bool isnull;
|
||||
Datum pars[1] = {ObjectIdGetDatum(id)};
|
||||
Datum pars[1];
|
||||
int stat;
|
||||
|
||||
arg[0] = OIDOID;
|
||||
pars[0] = ObjectIdGetDatum(id);
|
||||
|
||||
memset(prs, 0, sizeof(WParserInfo));
|
||||
SPI_connect();
|
||||
if (!plan_getparser)
|
||||
@ -132,16 +135,18 @@ static void *plan_name2id = NULL;
|
||||
Oid
|
||||
name2id_prs(text *name)
|
||||
{
|
||||
Oid arg[1] = {TEXTOID};
|
||||
Oid arg[1];
|
||||
bool isnull;
|
||||
Datum pars[1] = {PointerGetDatum(name)};
|
||||
Datum pars[1];
|
||||
int stat;
|
||||
Oid id = findSNMap_t(&(PList.name2id_map), name);
|
||||
|
||||
arg[0] = TEXTOID;
|
||||
pars[0] = PointerGetDatum(name);
|
||||
|
||||
if (id)
|
||||
return id;
|
||||
|
||||
|
||||
SPI_connect();
|
||||
if (!plan_name2id)
|
||||
{
|
||||
|
Reference in New Issue
Block a user