The only idea I have is to call oidin() to do the conversion from string
to oid.  I see this in copy.c:

                    loaded_oid = DatumGetObjectId(DirectFunctionCall1(oidin,
                                               CStringGetDatum(string)));
                    if (loaded_oid == InvalidOid)
                        ereport(ERROR,
                                (errcode(ERRCODE_BAD_COPY_FILE_FORMAT),
                                 errmsg("invalid OID in COPY data")));

I would give that a try.

Yes but in this case, the Node is parsed like this:


| COMMENT ON LARGE OBJECT NumericOnly IS comment_text
{

...


n->objname = makeList1(makeAConst($5));


...

 $$ = (Node *) n;
}

So there is no CString to convert to a Datum...

Chris




---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings

Reply via email to