pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
ltree and PHP
2+ messages / 2 participants
[nested] [flat]

* ltree and PHP
@ 2021-02-05 04:44 Open _ <opensheart@yahoo.com>
  2021-02-05 05:33 ` Re: ltree and PHP Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Open _ @ 2021-02-05 04:44 UTC (permalink / raw)
  To: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

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 ?

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: ltree and PHP
  2021-02-05 04:44 ltree and PHP Open _ <opensheart@yahoo.com>
@ 2021-02-05 05:33 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2021-02-05 05:33 UTC (permalink / raw)
  To: Open _ <opensheart@yahoo.com>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

Open _ <opensheart@yahoo.com> writes:
> 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.

It sounds like the ltree extension is in a schema that's not in the
search_path setting you're using from PHP.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-02-05 05:33 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-02-05 04:44 ltree and PHP Open _ <opensheart@yahoo.com>
2021-02-05 05:33 ` Tom Lane <tgl@sss.pgh.pa.us>

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