From: | Edoardo Panfili <edoardo(at)aspix(dot)it> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | can't figure string compare result (using also custom C function) |
Date: | 2009-02-13 21:31:49 |
Message-ID: | 4995E6C5.8060603@aspix.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I have this query: (1 result)
SELECT idSpecie,nome FROM specienomi
WHERE idspecie=37026 and nome='X Agropogon littoralis (Sm.) C.E. Hubb.';
idspecie | nome
----------+-----------------------------------------
37026 | X Agropogon littoralis (Sm.) C.E. Hubb.
The same query but without one condition: no results.
SELECT idSpecie,nome FROM specienomi
WHERE nome='X Agropogon littoralis (Sm.) C.E. Hubb.';
idspecie | nome
----------+------
(0 rows)
I can't figure why, can someone tell me how investigate?
specienomi is a view
idSpecie is a numeric field (the key of another table)
nome is a text field generated by a custom C function (using 18 fields
(1 enumerate type, 1 boolean, 16 text).
The problem arises only with particular records, when the first
character of the string is generated by my function [1].
When the first character is copied from postgres parameter [2] all works
fine.
[1] buffer[0]='X'; buffer[1]=' ';
[2] memcpy(buffer,VARDATA(part),VARSIZE(part)-VARHDRSZ)
Thank you
Edoardo
From | Date | Subject | |
---|---|---|---|
Next Message | Sam Mason | 2009-02-13 22:23:27 | Re: can't figure string compare result (using also custom C function) |
Previous Message | Tom Lane | 2009-02-13 20:04:31 | Re: [GENERAL] 8.3 doc issue |