Re: [GENERAL] IN in a geometric database using data type point
Hi Romain, Assuming you have PostGIS installed and position is defined as a point or multpoint ADT then you could use the ST_Intersect operator SELECT * FROM map WHERE ST_Intersects(position, 'MULTIPOINT(-1 -1,1 -1,1 1,-1 1)'); Regards Andrew On 2010-09-26, at 12:27 PM, Romain Billoir wrote: Hi, i'm trying to request a database using data type point using keyword IN with a list of point generated by PHP, like this: 'SELECT * FROM map WHERE position IN ((point(-1,-1), (point(1,-1), point(1,1), point(-1,1))' but this request returns me an error: operator doesn't exist point = point. so i tried to use a path unstead of list of point like this: 'SELECT * FROM map WHERE position @ path '(point(-1,-1), (point(1,-1), point(1,1), point(-1,1))' but this request returns me the point 0,0??? Is anybody have a suggestions? Thanks. Andrew Hunter PEng RPSurv PhD Assistant Professor Department of Geomatics Engineering Schulich School of Engineering University of Calgary T: +403.220.7377 F: +403.284.1980 E: ahunter (at) ucalgary (dot) ca ~
Re: [GENERAL] Visualize GiST Index
On 2010-09-23, at 10:27 AM, Tom Lane wrote: Andrew Hunter ahun...@ucalgary.ca writes: On 2010-09-22, at 9:56 PM, Tom Lane wrote: Andrew Hunter ahun...@ucalgary.ca writes: I have been trying to install the Gevel module but am getting an error when running make on the gevel files download. The error is: /contrib/contrib-global.mk: No such file or directory. I have also tried USE_PGXS=1 make, but get the same result. I am unable to find contrib-global.mk. Could we see the output of pg_config? PGXS = /usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/pgxs.mk Hm. If that file is in fact present, I'd have expected make USE_PGXS=1 to work. The error you cite looks like what would happen without USE_PGXS --- are you sure you get the exact same error both ways? If you're still baffled, it might help to show Gevel's Makefile. It's possible it isn't invoking pgxs correctly. regards, tom lane Hi Tom, Yes, I got the same result with USE_PGXS=1. This is my first attempt at compiling a module for Postgresql, so it could well be something very simple that I am missing... Here is the content of the gevel Makefile subdir = contrib/gevel top_builddir = ../.. include $(top_builddir)/src/Makefile.global MODULES = gevel DATA_built = gevel.sql DOCS = README.gevel REGRESS = gevel include $(top_srcdir)/contrib/contrib-global.mk I have tried running this from the gevel directory under /usr/share/postgresql/8.4/contrib Thanks for your assistance. Regards Andrew Andrew Hunter PEng RPSurv PhD Assistant Professor Department of Geomatics Engineering Schulich School of Engineering University of Calgary T: +403.220.7377 F: +403.284.1980 E: ahunter (at) ucalgary (dot) ca ~
Re: [GENERAL] Visualize GiST Index
Hi Tom, Thanks very much for your assistance, your suggestion worked a treat. I have updated the gevel people. Regards Andrew On 2010-09-23, at 2:05 PM, Tom Lane wrote: Andrew Hunter ahun...@ucalgary.ca writes: Here is the content of the gevel Makefile subdir = contrib/gevel top_builddir = ../.. include $(top_builddir)/src/Makefile.global MODULES = gevel DATA_built = gevel.sql DOCS = README.gevel REGRESS = gevel include $(top_srcdir)/contrib/contrib-global.mk Oh ... well, there's your problem: it's not even *trying* to use PGXS. Replace it with this: MODULES = gevel DATA_built = gevel.sql DOCS = README.gevel REGRESS = gevel ifdef USE_PGXS PG_CONFIG = pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS) else subdir = contrib/gevel top_builddir = ../.. include $(top_builddir)/src/Makefile.global include $(top_srcdir)/contrib/contrib-global.mk endif ... and file a bug with the gevel authors, whoever they are, telling them to fix that upstream. regards, tom lane Andrew Hunter PEng RPSurv PhD Assistant Professor Department of Geomatics Engineering Schulich School of Engineering University of Calgary T: +403.220.7377 F: +403.284.1980 E: ahunter (at) ucalgary (dot) ca ~ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] Visualize GiST Index
On 2010-09-22, at 9:56 PM, Tom Lane wrote: Andrew Hunter ahun...@ucalgary.ca writes: I have been trying to install the Gevel module but am getting an error when running make on the gevel files download. The error is: /contrib/contrib-global.mk: No such file or directory. I have also tried USE_PGXS=1 make, but get the same result. I am unable to find contrib-global.mk. Could we see the output of pg_config? (If you don't have pg_config installed, you're probably missing postgresql-devel or whatever the equivalent subpackage is on Ubuntu.) regards, tom lane Hi Tom, Here is the output from pg_config and...@andrew-server:~$ pg_config BINDIR = /usr/lib/postgresql/8.4/bin DOCDIR = /usr/share/doc/postgresql HTMLDIR = /usr/share/doc/postgresql INCLUDEDIR = /usr/include/postgresql PKGINCLUDEDIR = /usr/include/postgresql INCLUDEDIR-SERVER = /usr/include/postgresql/8.4/server LIBDIR = /usr/lib PKGLIBDIR = /usr/lib/postgresql/8.4/lib LOCALEDIR = /usr/share/locale MANDIR = /usr/share/postgresql/8.4/man SHAREDIR = /usr/share/postgresql/8.4 SYSCONFDIR = /etc/postgresql-common PGXS = /usr/lib/postgresql/8.4/lib/pgxs/src/makefiles/pgxs.mk CONFIGURE = '--build=i486-linux-gnu' '--prefix=/usr' '--includedir=/usr/include' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--libexecdir=/usr/lib/postgresql-8.4' '--disable-maintainer-mode' '--disable-dependency-tracking' '--disable-silent-rules' '--srcdir=.' '--mandir=/usr/share/postgresql/8.4/man' '--with-docdir=/usr/share/doc/postgresql-doc-8.4' '--sysconfdir=/etc/postgresql-common' '--datadir=/usr/share/postgresql/8.4' '--bindir=/usr/lib/postgresql/8.4/bin' '--includedir=/usr/include/postgresql/' '--enable-nls' '--enable-integer-datetimes' '--enable-thread-safety' '--enable-debug' '--disable-rpath' '--with-tcl' '--with-perl' '--with-python' '--with-pam' '--with-krb5' '--with-gssapi' '--with-openssl' '--with-libxml' '--with-libxslt' '--with-ldap' '--with-ossp-uuid' '--with-gnu-ld' '--with-tclconfig=/usr/lib/tcl8.5' '--with-tkconfig=/usr/lib/tk8.5' '--with-includes=/usr/include/tcl8.5' '--with-system-tzdata=/usr/share/zoneinfo' '--with-pgport=5432' 'CFLAGS=-g -O2 -g -Wall -O2 -fPIC' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,--as-needed' 'build_alias=i486-linux-gnu' 'CPPFLAGS=' CC = gcc CPPFLAGS = -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.5 CFLAGS = -g -O2 -g -Wall -O2 -fPIC -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -g CFLAGS_SL = -fpic LDFLAGS = -Wl,-Bsymbolic-functions -Wl,--as-needed -Wl,--as-needed LDFLAGS_SL = LIBS = -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lkrb5 -lcom_err -lgssapi_krb5 -lz -lreadline -lcrypt -ldl -lm VERSION = PostgreSQL 8.4.4 Regards Andrew Hunter PEng RPSurv PhD Assistant Professor Department of Geomatics Engineering Schulich School of Engineering University of Calgary T: +403.220.7377 F: +403.284.1980 E: ahunter (at) ucalgary (dot) ca ~ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
[GENERAL] Visualize GiST Index
I have been trying to install the Gevel module but am getting an error when running make on the gevel files download. The error is: /contrib/contrib-global.mk: No such file or directory. I have also tried USE_PGXS=1 make, but get the same result. I am unable to find contrib-global.mk. I have postgresql 8.4.4 on ubuntu 9.10. If anybody has any pointers on how to install the gevel module I'd appreciate hearing them. Thanks Andrew Hunter PEng RPSurv PhD Assistant Professor Department of Geomatics Engineering Schulich School of Engineering University of Calgary T: +403.220.7377 F: +403.284.1980 E: ahunter (at) ucalgary (dot) ca ~ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general