Re: [GENERAL] template_postgis issue

2015-05-15 Thread Giuseppe Broccolo
postgis in the database of your choosing or use PgAdmin Extensions install feature which we will cover in this tutorial. <http://www.bostongis.com/PrinterFriendly.aspx?content_name=postgis_tut01> Regards, -- Giuseppe Broccolo - 2ndQuadrant Italy PostgreSQL Training, Services and Support giuseppe.brocc...@2ndquadrant.it | www.2ndQuadrant.it

Re: [GENERAL] How to get PG 9.3 for a RaspberryPI (Debian Wheezy)?

2014-08-05 Thread Giuseppe Broccolo
- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- Giuseppe Broccolo - 2ndQuadrant Italy PostgreSQL Training, Services and Support giuseppe.brocc...@2ndquadrant.it | www.2ndQuadrant.it

Re: [GENERAL] GiST index question

2014-09-04 Thread Giuseppe Broccolo
n index on the path data type or > do I > > need to enable an extension for this to work? Thanks in advance for your > > help. > In-core contrib modules (and core) do not have yet support for gist > operator classes for the datatype path as far as I recall. > Regards,

Re: [GENERAL] BDR conpilation error un Ubuntu 12.4 LTS

2014-12-22 Thread Giuseppe Broccolo
y -fno-strict-aliasing -fwrapv -fexcess-precision=standard > -fpic -I../../src/interfaces/libpq -I. -I. -I../../src/include > -D_GNU_SOURCE -c -o bdr_apply.o bdr_apply.c > bdr_apply.c: In function ‘process_remote_commit’: > bdr_apply.c:286:2: error: invalid operands to binary &

Re: [GENERAL] BDR conpilation error un Ubuntu 12.4 LTS

2014-12-23 Thread Giuseppe Broccolo
; \ > ^ > bdr_apply.c:355:3: note: in expansion of macro ‘ereport’ >ereport(LOG, >^ > make: *** [bdr_apply.o] Error 1 > > Regards. > > 2014-12-23 8:11 GMT+01:00 stefano bonnin : >> >> Hi Giuseppe, >> >> gcc (Ubuntu/Linaro 4.6.3

Re: [GENERAL] Removing duplicates

2013-07-10 Thread Giuseppe Broccolo
Dear Johann, I tried (with PostgreSQL 9.2) to run the two DELETE statements you describe in your mail (the first based on the "id" field, the second on the ctid) and they work! I have to point out that if you use the DELETE based on the "id" field YOU'LL DELETE ALL RECORDS having at least one

Re: [GENERAL] pg recovery

2013-07-11 Thread Giuseppe Broccolo
? Any view/function? The only way to be sure that your configuration file is read is to stop and restart the PostgreSQL service. Regards, Giuseppe. -- Giuseppe Broccolo - 2ndQuadrant Italy PostgreSQL Training, Services and Support giuseppe.brocc...@2ndquadrant.it | www.2ndQuadrant.it

Re: [GENERAL] last_vacuum field is not updating

2013-07-15 Thread Giuseppe Broccolo
skip over any tables that the calling user does not have permission to vacuum. Are you sure you are the table's owner? Regards, Giuseppe. -- Giuseppe Broccolo - 2ndQuadrant Italy PostgreSQL Training, Services and Support giuseppe.brocc...@2ndquadrant.it | www.2ndQuadrant.it -- Sent

Re: [GENERAL] Index for Levenshtein distance (better format)

2013-07-22 Thread Giuseppe Broccolo
he same query. I made a simple check with a very simple table1 example with ten raws using EXPLAIN ANALYSE to exploit the performances: query time changes from 1.077 ms to 0.677 ms after gist index creation. Hope it helps, Giuseppe. -- Giuseppe Broccolo - 2ndQuadrant Italy PostgreSQL Training,

Re: [GENERAL] process deadlocking on its own transactionid?

2013-07-24 Thread Giuseppe Broccolo
vity ka ON kl.pid = ka.procpid ON bl.transactionid = kl.transactionid AND bl.pid != kl.pid WHERE NOT bl.granted; Hope it can help. Giuseppe. -- Giuseppe Broccolo - 2ndQuadrant Italy PostgreSQL Training, Services and Support giuseppe.brocc...@2ndquadrant.it | www.

Re: [GENERAL] Rule Question

2013-07-25 Thread Giuseppe Broccolo
; and b='goodbye'. Anyway, this is just an example. I suggest that you look at the CREATE TRIGGER page in the documentation http://www.postgresql.org/docs/9.2/static/sql-createtrigger.html as you can also consider conditional triggers to be executed, for example, only when the b column is upd

Re: [GENERAL] Rule Question

2013-07-25 Thread Giuseppe Broccolo
Unrelated to the OP's question, the suggestion above could be more simply rewritten as TG_OP = 'UPDATE' AND NEW.b IS DISTINCT FROM OLD.b You're right! :) Giuseppe. -- Giuseppe Broccolo - 2ndQuadrant Italy PostgreSQL Training, Services and Support giuseppe.brocc...@

Re: [GENERAL] How to do incremental / differential backup every hour in Postgres 9.1?

2013-07-26 Thread Giuseppe Broccolo
. Notice that WALs are collected at the end of the backup, so you need to set wal_keep_segments parameter high enough that the log is not removed before the end of the backup. Giuseppe. -- Giuseppe Broccolo - 2ndQuadrant Italy PostgreSQL Training, Services and Support giuseppe.brocc...@2ndquadrant.it

Re: [GENERAL] postgres FDW cost estimation options unrecognized in 9.3-beta1

2013-07-29 Thread Giuseppe Broccolo
wrapper | Access privileges | Type | Version |FDW Options | Description ---+---+--+---+--+-----+-

Re: [GENERAL] Alter table never finishes

2013-07-30 Thread Giuseppe Broccolo
;{print $2}'`; do kill -9 $x; done Hope it can help. Giuseppe. -- Giuseppe Broccolo - 2ndQuadrant Italy PostgreSQL Training, Services and Support giuseppe.brocc...@2ndquadrant.it | www.2ndQuadrant.it

Re: [GENERAL] Query on a record variable

2013-08-19 Thread Giuseppe Broccolo
#x27;string') < 10 AND LENGTH(dede) BETWEEN x AND y AND plainto_tsquery('string') @@ vectors; Hope it can help. Giuseppe. -- Giuseppe Broccolo - 2ndQuadrant Italy PostgreSQL Training, Services and Support giuseppe.brocc...@2ndquadrant.it | www.2ndQuadrant.it -- Sent via pgsql-ge

Re: [GENERAL] FETCH FORWARD 0 and "cursor can only scan forward" error

2013-09-04 Thread Giuseppe Broccolo
t; you move ahead of zero places instead of one; therefore you obtain the same record *that was yet fetched* by the previous FETCH statement. If the cursor is declared with the NO ROLL options, this operation is forbidden, and an error is raised, as in your case. Giuseppe. -- Giuseppe

Re: [GENERAL] plpgsql code doen't work

2013-09-10 Thread Giuseppe Broccolo
as an 'integer'... Giuseppe. -- Giuseppe Broccolo - 2ndQuadrant Italy PostgreSQL Training, Services and Support giuseppe.brocc...@2ndquadrant.it | www.2ndQuadrant.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.post

Re: [GENERAL] FW: Single Line Query Logging

2013-09-10 Thread Giuseppe Broccolo
in your postgres.conf - do a check) LOCAL0.*-/var/log/pgsql and in the "catch all log files" area add LOCAL0.none then restart syslog (sudo /etc/init.d/rsyslog restart). I've tried it, and it works! Giuseppe. -- Giuseppe Broccolo - 2ndQuadra

Re: [GENERAL] Risk of set system wise statement_timeout

2013-09-12 Thread Giuseppe Broccolo
0 * * * * psql -c "SELECT cancel_after_2hours();" to be sure that it will be executed in automatic way. Hope it can help, Giuseppe. -- Giuseppe Broccolo - 2ndQuadrant Italy PostgreSQL Training, Services and Support giuseppe.brocc...@2ndquadrant.it | www.2ndQuadrant.it -- Sent via pgs

Re: [GENERAL] problem with query

2013-09-13 Thread Giuseppe Broccolo
ASCII, even if terminal show pairs as 'ñ' or 'Ñ'. So ILIKE operator cannot apply case insensitive pattern matching to data which does not encode any string (in the SQL_ASCII encoding) and works as a normal LIKE. Even if the client which insert data has 8-bit encoding (

Re: [GENERAL] remove everything before the period

2013-09-17 Thread Giuseppe Broccolo
eriod but i want to show everything after the period select volume, substring(volume from 1 for position('.' in volume) - 1) as column from MyTable; Try with: " SELECT volume, substring(volume from position('.' in volume) + 1) AS column FROM MyTable; " Giusep

Re: [GENERAL] CREATE DATABASE Š [ TEMPLATE [=] template ] [ TABLESPACE [=] tablespace_name ]

2013-09-26 Thread Giuseppe Broccolo
the objects creation, independently it's done from a template or not. Giuseppe. -- Giuseppe Broccolo - 2ndQuadrant Italy PostgreSQL Training, Services and Support giuseppe.brocc...@2ndquadrant.it | www.2ndQuadrant.it

Re: [GENERAL] pgbench

2013-10-03 Thread Giuseppe Broccolo
pported, and empty lines are ignored. This could bring to errors. Could this be your case? Giuseppe. -- Giuseppe Broccolo - 2ndQuadrant Italy PostgreSQL Training, Services and Support giuseppe.brocc...@2ndquadrant.it | www.2ndQuadrant.it -- Sent via pgsql-general mailing list (pgsql-general@

Re: [GENERAL] vacuum_freeze_table_age for 9.3.2

2013-12-05 Thread Giuseppe Broccolo
FrozenXID. vacuum_freeze_table_age is a parameter with context 'user', meaning that you can set it during a session and run a "vacuum freeze" with the modified setting. Giuseppe. - -- Giuseppe Broccolo - 2ndQuadrant Italy PostgreSQL Training, Services and Support giuseppe.bro

Re: [GENERAL] vacuum_freeze_table_age for 9.3.2

2013-12-05 Thread Giuseppe Broccolo
old XIDs are replaced by FrozenXID. vacuum_freeze_table_age is a parameter with context 'user', meaning that you can set it during a session and run a "vacuum freeze" with the modified setting. Giuseppe. - -- Giuseppe Broccolo - 2ndQuadrant Italy PostgreSQL Training, Services and Support giuseppe.

Re: [GENERAL] Why the size (PQ_BUFFER_SIZE) of backend send buffers is 8192 ?

2014-01-03 Thread Giuseppe Broccolo
there is no reason to expect advantage splitting 8k buffers (i.e. a page content size) in my opinion. Giuseppe. - -- Giuseppe Broccolo - 2ndQuadrant Italy PostgreSQL Training, Services and Support giuseppe.brocc...@2ndquadrant.it | www.2ndQuadrant.it -BEGIN PGP SIGNATURE- Comment: Usin

Re: [GENERAL] How to turn off DEBUG statements from psql commends

2014-02-10 Thread Giuseppe Broccolo
ed; blockState: STARTED; > state: INPROGR, xid/subid/cid: 15099/1/1, nestlvl: 1, children: > CREATE SCHEMA gis_demo=# You have set the "client_min_messages" to "debug" level. If you launch SET client_min_messages TO notice; You should obtain just the "CREATE