Re: [GENERAL] What is the purpose of PostGIS on PostgreSQL?

2017-01-24 Thread Johann Spies
On 25 January 2017 at 08:32, Gavin Flower wrote: > > >> >> What is 'shapefile'? > > I don't recall ever coming across that term! > https://en.wikipedia.org/wiki/Shapefile > See https://en.wikipedia.org/wiki/Shapefile Regards Johann -- Because experiencing your loyal love is better than life

Re: [GENERAL] What is the purpose of PostGIS on PostgreSQL?

2017-01-24 Thread Gavin Flower
On 25/01/17 14:12, Andy Colson wrote: On 01/23/2017 11:08 AM, Kased, Razy (Chemistry and Geosciences) wrote: I recently came across this question: "What is the purpose of PostGIS on PostgreSQL?" and wanted to know what this mailing list had to respo

Re: [GENERAL] Detailed progress reporting for "vacuuming indexes" stage

2017-01-24 Thread Michael Paquier
On Tue, Jan 24, 2017 at 5:37 PM, Alexander Shchapov wrote: > On Tue, Jan 24, 2017 at 8:57 AM, Michael Paquier > wrote: >> What would be more interesting would be like the heap to get >> information on the index block being cleaned up with reports being >> done via index_bulk_delete(). That's more

Re: [GENERAL] What is the purpose of PostGIS on PostgreSQL?

2017-01-24 Thread Andy Colson
On 01/23/2017 11:08 AM, Kased, Razy (Chemistry and Geosciences) wrote: I recently came across this question: "What is the purpose of PostGIS on PostgreSQL?" and wanted to know what this mailing list had to respond with. ​Thanks, PostGIS is to

Re: [GENERAL] Ajuda com definição

2017-01-24 Thread rob stone
On Tue, 2017-01-24 at 17:35 -0200, Márcio A. Sepp wrote: > Boa tarde, > > > > Tenho um caso onde o campo chave da tabela irá receber dois tipos de > informação: integer de tamanho 5 e integer de tamanho 7. > O problema disso é que se eu criar o campo como sendo integer, lá > pelas > tantas corr

Re: [GENERAL] Ajuda com definição

2017-01-24 Thread Leonardo M . Ramé
El 24/01/17 a las 16:35, Márcio A. Sepp escribió: Boa tarde, Tenho um caso onde o campo chave da tabela irá receber dois tipos de informação: integer de tamanho 5 e integer de tamanho 7. O problema disso é que se eu criar o campo como sendo integer, lá pelas tantas corro o risco de dar violaçã

[GENERAL] Ajuda com definição

2017-01-24 Thread Márcio A . Sepp
Boa tarde, Tenho um caso onde o campo chave da tabela irá receber dois tipos de informação: integer de tamanho 5 e integer de tamanho 7. O problema disso é que se eu criar o campo como sendo integer, lá pelas tantas corro o risco de dar violação de PK. As soluções possíveis seriam criar o camp

Re: [GENERAL] Why is materialized view creation a "security-restricted operation"?

2017-01-24 Thread Joshua Chamberlain
Thank you for the explanation! That's extremely helpful. It also makes sense now why my function can create a regular table even if not a temporary one. It seems a little strange that it doesn't apply to VIEWs as well, as I imagine selecting from a view would have the same potential for unexpected

Re: [GENERAL] How to get an exception detail in a function called in exception handler

2017-01-24 Thread Shakti Singh
Thanks for the reply Tom! The log_error_function is being called by thousands of functions and that is why I thought it would be great if there was a way without making changes to it and subsequently writing code to pass the parameters in all these exception block. Would have been awesome if erro

Re: [GENERAL] How to get an exception detail in a function called in exception handler

2017-01-24 Thread Tom Lane
Shakti Singh writes: > In oracle sqlcode and sqlerrm can be accessed in a function called from an > exception block. > How do I do this in PostgreSQL In PG those are local variables within an exception block. You'd have to pass their values to the error-logging function explicitly.

[GENERAL] How to get an exception detail in a function called in exception handler

2017-01-24 Thread Shakti Singh
Hello, I am porting Oracle to PostgreSQL. In oracle sqlcode and sqlerrm can be accessed in a function called from an exception block. How do I do this in PostgreSQL For example: How do I get exception details in function "myschema"."testerror" () in function "myschema"."logerror"(). I understa

Re: [GENERAL] recovery dump on database with different timezone

2017-01-24 Thread Adrian Klaver
On 01/24/2017 06:58 AM, Edmundo Robles wrote: thanks for your comments, i will change the constraints from date to timestamp with time zone, i hope this works :) There is good chance it will not work until the data is cleaned up or unless you pick just the right timezone to use in the constra

Re: [GENERAL] Segmentation fault calling shared object file

2017-01-24 Thread Tom Lane
Martin Moore writes: > Hi, I have a ‘C’ shared object that has been running on postgres since 8.3 > and maybe before – on 32 bit Debian. Currently on 9.3. > I’m trying to migrate to Google cloud (64 bit Debian) and get a seg fault > when calling one of the functions which have been recompiled o

[GENERAL] Segmentation fault calling shared object file

2017-01-24 Thread Martin Moore
Hi, I have a ‘C’ shared object that has been running on postgres since 8.3 and maybe before – on 32 bit Debian. Currently on 9.3. I’m trying to migrate to Google cloud (64 bit Debian) and get a seg fault when calling one of the functions which have been recompiled on the Google instance. This

Re: [GENERAL] recovery dump on database with different timezone

2017-01-24 Thread Edmundo Robles
thanks for your comments, i will change the constraints from date to timestamp with time zone, i hope this works :) On Mon, Jan 23, 2017 at 7:48 PM, Tom Lane wrote: > Adrian Klaver writes: > > On 01/23/2017 05:14 PM, David G. Johnston wrote: > >> To your example - testing in UTC is going to al

Re: [GENERAL] change type from NUMERIC(14,4) to NUMERIC(24,12)

2017-01-24 Thread Tom Lane
=?UTF-8?Q?Torsten_F=C3=B6rtsch?= writes: > we have a large table and want to change the type of one column > from NUMERIC(14,4) to NUMERIC(24,12). If the new type is just NUMERIC > without any boundaries, the operation is fast. If (24,12) is specified, it > takes ages. > I think it takes so long

Re: [GENERAL] Why is materialized view creation a "security-restricted operation"?

2017-01-24 Thread Albe Laurenz
Joshua Chamberlain wrote: > I see this has been discussed briefly before[1], but I'm still not clear on > what's happening and why. > > I wrote a function that uses temporary tables in generating a result set. I > can use it when creating > tables or views, e.g., > CREATE TABLE some_table AS SEL

Re: [GENERAL] change type from NUMERIC(14,4) to NUMERIC(24,12)

2017-01-24 Thread Torsten Förtsch
I found that myself. But ... postgres=# create table x(n14_4 NUMERIC(14,4), n24_12 NUMERIC(24,12), n NUMERIC); CREATE TABLE postgres=# insert into x select i+.4, i+.12, i+.5234543 from generate_series(1,100) i; INSERT 0 100 postgres=# select * from x order by n limit 5; n14_4 | n24_12

Re: [GENERAL] change type from NUMERIC(14,4) to NUMERIC(24,12)

2017-01-24 Thread Albe Laurenz
Torsten Förtsch wrote: > we have a large table and want to change the type of one column from > NUMERIC(14,4) to NUMERIC(24,12). > If the new type is just NUMERIC without any boundaries, the operation is > fast. If (24,12) is > specified, it takes ages. > > I think it takes so long because the d

[GENERAL] change type from NUMERIC(14,4) to NUMERIC(24,12)

2017-01-24 Thread Torsten Förtsch
Hi, we have a large table and want to change the type of one column from NUMERIC(14,4) to NUMERIC(24,12). If the new type is just NUMERIC without any boundaries, the operation is fast. If (24,12) is specified, it takes ages. I think it takes so long because the database wants to check that all da

Re: [GENERAL] Detailed progress reporting for "vacuuming indexes" stage

2017-01-24 Thread Simon Riggs
On 24 January 2017 at 06:57, Michael Paquier wrote: > On Mon, Jan 23, 2017 at 8:32 PM, Alexander Shchapov > wrote: >> There are 7 stages for standard VACUUM process which is reportable via >> this view. For time consuming stages like "scanning heap" or >> "vacuuming heap" you are able to get stag

Re: [GENERAL] Detailed progress reporting for "vacuuming indexes" stage

2017-01-24 Thread Alexander Shchapov
On Tue, Jan 24, 2017 at 8:57 AM, Michael Paquier wrote: > What would be more interesting would be like the heap to get > information on the index block being cleaned up with reports being > done via index_bulk_delete(). That's more work, and that would be more > helpful than just a number. > > So