Re: C trigger problem : conversion of CString to Datum

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Guy Deleeuw <G(dot)De_Leeuw(at)eurofer(dot)be>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: C trigger problem : conversion of CString to Datum
Date: 2010-02-20 15:45:31
Message-ID: 942.1266680731@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Guy Deleeuw <G(dot)De_Leeuw(at)eurofer(dot)be> writes:
> I cannot convert properly a cstring to a Datum :

Well, CStringGetDatum would be the proper thing to use if you meant to
produce a Datum of type "cstring". But what you need here is a Datum
of the same type as the target column, which evidently isn't cstring.
Most likely you need to convert the string to type text.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Nilesh Govindarajan 2010-02-20 17:11:28 Backups
Previous Message Guy Deleeuw 2010-02-20 15:05:16 C trigger problem : conversion of CString to Datum