ltree and PHP

From: Open _ <opensheart(at)yahoo(dot)com>
To: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: ltree and PHP
Date: 2021-02-05 04:44:33
Message-ID: 1170495024.1919421.1612500273286@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I've created the ltree extensioncreated a table with an ltree column called ltree_path
In php I can access the table, insert, update, delete.but ltree operators don't work.
select count() from schema.table 
where 'A.B.C' @> ltree_path;
gives me a "could not determine polymorphic type anyrange because input has type unknown'
The same statement works just fine in psql, but not in PHP
If I change the statement to:

select count() from schema.table 
where cast('A.B.C' as schema.ltree) @> ltree_path;
I get a different error: "operator does not exist:"
pointing to the @>
Is there someplace to 'create' or include ltree in PHP ?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jagmohan Kaintura 2021-02-05 05:27:37 updating(column) Porting from Oracle Trigger to PostgreSQL trigger
Previous Message Thomas Munro 2021-02-05 02:58:12 Re: Unable To Drop Tablespace