Re: Coding help

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Coding help
Date: 2003-11-09 10:10:18
Message-ID: 3FAE128A.1080200@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-11-09 14:05:11 Re: [HACKERS] BEGIN vs START TRANSACTION
Previous Message Peter Eisentraut 2003-11-09 09:18:33 Re: [HACKERS] BEGIN vs START TRANSACTION