Re: C trigger problem : conversion of CString to Datum

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

Hi Tom

Many thanks for your answer, all work fine now :-)

Regards
Guy

Le 20/02/10 16:45, Tom Lane a écrit :
> 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

Browse pgsql-admin by date

  From Date Subject
Next Message Andrzej Zawadzki 2010-02-21 19:20:03 Re: upgrading, but learned about pg_dumpall too late
Previous Message Scott Marlowe 2010-02-21 02:35:50 Re: pg_dump/restore problems