pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Guy Deleeuw <G.De_Leeuw@eurofer.be>
Cc: pgsql-admin@postgresql.org
Subject: Re: C trigger problem : conversion of CString to Datum
Date: Sat, 20 Feb 2010 10:45:31 -0500
Message-ID: <942.1266680731@sss.pgh.pa.us> (raw)
In-Reply-To: <4B7FFA2C.3030001@eurofer.be>
References: <4B7FFA2C.3030001@eurofer.be>

Guy Deleeuw <G.De_Leeuw@eurofer.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



view thread (3+ messages)  latest in thread

Message-ID: <942.1266680731@sss.pgh.pa.us>
Permalink:  ../942.1266680731@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/942.1266680731@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, G.De_Leeuw@eurofer.be
  Subject: Re: C trigger problem : conversion of CString to Datum
  In-Reply-To: <942.1266680731@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox