Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 1E81F632A5D for ; Sun, 21 Feb 2010 06:15:52 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 65448-05 for ; Sun, 21 Feb 2010 10:15:41 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from brublucs01.mactelecom.net (brublucs01.mactelecom.net [217.64.240.242]) by mail.postgresql.org (Postfix) with ESMTP id 9EA3F6327EB for ; Sun, 21 Feb 2010 06:15:41 -0400 (AST) Received: by brublucs01.mactelecom.net (Postfix, from userid 1006) id BBD8DF7C2F; Sun, 21 Feb 2010 10:15:38 +0000 (UTC) Received: from smtp.eurofer.be (217.64.254.218.mactelecom.net [217.64.254.218]) by brublucs01.mactelecom.net (Postfix) with ESMTP id 53AFCF7C05; Sun, 21 Feb 2010 10:15:38 +0000 (UTC) Received: from [192.168.5.10] by smtp.eurofer.be with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1Nj8qX-0001Sb-0l; Sun, 21 Feb 2010 11:15:39 +0100 Message-ID: <4B8107B5.4010702@eurofer.be> Date: Sun, 21 Feb 2010 11:15:17 +0100 From: Guy Deleeuw User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); fr; rv:1.9.1.5) Gecko/20091204 Lightning/1.0b1 Thunderbird/3.0 MIME-Version: 1.0 To: Tom Lane CC: pgsql-admin@postgresql.org References: <4B7FFA2C.3030001@eurofer.be> <942.1266680731@sss.pgh.pa.us> In-Reply-To: <942.1266680731@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam_score: -4.4 X-SA-Exim-Connect-IP: 192.168.5.10 X-SA-Exim-Mail-From: G.De_Leeuw@eurofer.be Subject: Re: C trigger problem : conversion of CString to Datum X-SA-Exim-Scanned: Yes (on smtp.eurofer.be) X-All-Recipients: tgl@sss.pgh.pa.us, pgsql-admin@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=-10 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 201002/166 X-Sequence-Number: 33769 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 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 >