Search Postgresql Archives

can't figure string compare result (using also custom C function)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux