[GENERAL] Unexpected array_remove results

2015-03-19 Thread Matija Lesar
Hi, should not in example below array_remove return same results? test1=# create temp table tmptest (trid text[]); CREATE TABLE test1=# insert into tmptest values(null::text[]); INSERT 0 1 test1=# update tmptest set trid[2:4]='{b,NULL,d}'; UPDATE 1 test1=# select trid,array_remove(trid, NULL::tex

Re: [GENERAL] How does one make the following psql statement sql-injection resilient?

2015-03-19 Thread David G. Johnston
On Thu, Mar 19, 2015 at 12:46 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Thu, Mar 19, 2015 at 12:43 PM, Alvaro Herrera > wrote: > >> David G. Johnston wrote: >> >> > Except that server "COPY" only is documented to accept a "query" that >> > begins with either SELECT or VALUES

Re: [GENERAL] regclass and format('%I')

2015-03-19 Thread Jason Dusek
On 15 March 2015 at 08:44, Tom Lane wrote: > "David G. Johnston" writes: > > ​IOW, as long as the output string matches: ^"(?:"{2})*"$ I do not see > how > > it is possible ​for format to lay in a value at %I that is any more > > insecure than the current behavior. If the input string already m

Re: [GENERAL] How does one make the following psql statement sql-injection resilient?

2015-03-19 Thread David G. Johnston
On Thu, Mar 19, 2015 at 12:43 PM, Alvaro Herrera wrote: > David G. Johnston wrote: > > > Except that server "COPY" only is documented to accept a "query" that > > begins with either SELECT or VALUES :( > > > > I hereby voice my desire for EXECUTE to be usable as well. > > Feel free to submit a pa

[GENERAL] Re: How does one make the following psql statement sql-injection resilient?

2015-03-19 Thread Alvaro Herrera
David G. Johnston wrote: > Except that server "COPY" only is documented to accept a "query" that > begins with either SELECT or VALUES :( > > I hereby voice my desire for EXECUTE to be usable as well. Feel free to submit a patch ... -- Álvaro Herrerahttp://www.2ndQuadrant.com/

Re: [GENERAL] How does one make the following psql statement sql-injection resilient?

2015-03-19 Thread David G. Johnston
On Mon, Mar 16, 2015 at 9:31 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Monday, March 16, 2015, Alvaro Herrera > wrote: > >> David G. Johnston wrote: >> >> > Thanks! I got the gist even with the typo. I actually pondered about >> > prepare/execute after hitting send. Am I

Re: [GENERAL] Unicode license compatibility with PostgreSQL license

2015-03-19 Thread Peter Geoghegan
On Wed, Mar 18, 2015 at 11:03 PM, Haribabu Kommi wrote: > For our next set of development activities in PostgreSQL, we want to > use the Unicode organization code with PostgreSQL to open source that > feature. Is the Unicode license is compatible with PostgreSQL. Do you mean that you'd like to ad

Re: [GENERAL] Unicode license compatibility with PostgreSQL license

2015-03-19 Thread John R Pierce
On 3/18/2015 11:03 PM, Haribabu Kommi wrote: For our next set of development activities in PostgreSQL, we want to use the Unicode organization code with PostgreSQL to open source that feature. Is the Unicode license is compatible with PostgreSQL. I'm curious... What does this Unicode Inc code

Re: [GENERAL] Re: [pgadmin-support] Issue with a hanging apply process on the replica db after vacuum works on primary

2015-03-19 Thread Sergey Shchukin
17.03.2015 13:22, Sergey Shchukin пишет: 05.03.2015 11:25, Jim Nasby пишет: On 2/27/15 5:11 AM, Sergey Shchukin wrote: show max_standby_streaming_delay; max_standby_streaming_delay - 30s We both need to be more clear about which server we're talking about (ma

Re: [GENERAL] Archeiving and Purging

2015-03-19 Thread Adrian Klaver
On 03/18/2015 11:38 PM, adityagis wrote: HI David/John, Thanks for the support. But as of now I have not done any configuaration for the archieving process. I hope once my configuarations are done then may be I can proceed with your suggestions. I am still looking for the intial process that

Re: [GENERAL] Installation Size showing huge size in postgres installed on windows os

2015-03-19 Thread jaime soler gómez
El mié, 18-03-2015 a las 23:05 -0700, Rajagopal NS escribió: > I have installed Postgres 9.0 in my machine. When I look at Programs and > Features under Control Panel, > I see the Size for Postgres 9.0 is shown as 121GB. > > I feel neither the installation or the small postgres databases I would

Re: [GENERAL] Archeiving and Purging

2015-03-19 Thread adityagis
HI David/John, Thanks for the support. But as of now I have not done any configuaration for the archieving process. I hope once my configuarations are done then may be I can proceed with your suggestions. I am still looking for the intial process that need to be performed for archeiving. Thank

[GENERAL] Installation Size showing huge size in postgres installed on windows os

2015-03-19 Thread Rajagopal NS
I have installed Postgres 9.0 in my machine. When I look at Programs and Features under Control Panel, I see the Size for Postgres 9.0 is shown as 121GB. I feel neither the installation or the small postgres databases I would have created use 121GB. Any reason why it shows 121GB Regards NS Raja

Re: [GENERAL] Sequences not created, bug in pg_dump?

2015-03-19 Thread Adrian Klaver
On 03/19/2015 10:02 AM, "Leonardo M. Ramé" wrote: El 19/03/15 a las 13:09, Adrian Klaver escibió: On 03/19/2015 08:43 AM, "Leonardo M. Ramé" wrote: Hi, I'm creating a database dump excluding one table and found only the sequences created implicitly (using serial type) are created when I resto

Re: [GENERAL] Sequences not created, bug in pg_dump?

2015-03-19 Thread Leonardo M. Ramé
El 19/03/15 a las 13:09, Adrian Klaver escibió: On 03/19/2015 08:43 AM, "Leonardo M. Ramé" wrote: Hi, I'm creating a database dump excluding one table and found only the sequences created implicitly (using serial type) are created when I restore the dump. The command I use is: pg_dump -T tabl

Re: [GENERAL] Sequences not created, bug in pg_dump?

2015-03-19 Thread Adrian Klaver
On 03/19/2015 08:43 AM, "Leonardo M. Ramé" wrote: Hi, I'm creating a database dump excluding one table and found only the sequences created implicitly (using serial type) are created when I restore the dump. The command I use is: pg_dump -T table_to_be_excluded mydb I understand all related ob

[GENERAL] Sequences not created, bug in pg_dump?

2015-03-19 Thread Leonardo M. Ramé
Hi, I'm creating a database dump excluding one table and found only the sequences created implicitly (using serial type) are created when I restore the dump. The command I use is: pg_dump -T table_to_be_excluded mydb I understand all related objects to the table to be excluded are not dumpl

Re: [GENERAL] Installation Size showing huge size in postgres installed on windows os

2015-03-19 Thread Alban Hertroys
On 19 March 2015 at 13:44, Raymond O'Donnell wrote: > On 19/03/2015 12:39, jaime soler wrote: >> El mié, 18-03-2015 a las 23:05 -0700, Rajagopal NS escribió: >>> I have installed Postgres 9.0 in my machine. When I look at Programs and >>> Features under Control Panel, >>> I see the Size for Postgr

Re: [GENERAL] Archeiving and Purging

2015-03-19 Thread Samuel Smith
On 03/18/2015 09:20 AM, adityagis wrote: Dear Users, I have lots of data in my DB. I need to do archeiving and purging of my data. Can anyone please help me with step by step riles? Thanks in Advance. Aditya Kumar -- View this message in context: http://postgresql.nabble.com/Archeiving-an

Re: [GENERAL] Installation Size showing huge size in postgres installed on windows os

2015-03-19 Thread Raymond O'Donnell
On 19/03/2015 12:39, jaime soler wrote: > El mié, 18-03-2015 a las 23:05 -0700, Rajagopal NS escribió: >> I have installed Postgres 9.0 in my machine. When I look at Programs and >> Features under Control Panel, >> I see the Size for Postgres 9.0 is shown as 121GB. >> >> I feel neither the instal

Re: [GENERAL] Installation Size showing huge size in postgres installed on windows os

2015-03-19 Thread jaime soler
El mié, 18-03-2015 a las 23:05 -0700, Rajagopal NS escribió: > I have installed Postgres 9.0 in my machine. When I look at Programs and > Features under Control Panel, > I see the Size for Postgres 9.0 is shown as 121GB. > > I feel neither the installation or the small postgres databases I would

Re: [GENERAL] Name spacing functions and stored procedures

2015-03-19 Thread Steven Erickson
I’ve always used schemas – usually one for each of the business processes. From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Pavel Stehule Sent: Thursday, March 19, 2015 12:38 AM To: Tim Uckun Cc: pgsql-general Subject: Re: [GENERAL] Name spacing fu

[GENERAL] Get extensions directory programmatically in another Makefile

2015-03-19 Thread Igor Stassiy
Hello, This might seem like an XY problem, but I need to solve it. I am using pgxs to install an extension but I need to refer to the location of the installation directory in another Makefile. How safe is it to assume that MODULE_PATHNAME that I use for CREATE FUNCTION ... AS 'MODULE_PATHNAME'

Re: [GENERAL] Reg: PostgreSQL Server "base/data" recovery

2015-03-19 Thread Prajilal KP
> > I see, As there are many reasons exists for the data corruption i couldn't > > figure out it exactly. > > Unfortunately there is no backup for this system and is not possible to > > restore from the backup. > > Well, then, lost data is lost. Oh.. My bad ... > > > I have been using the NFS stor

Re: [GENERAL] Reg: PostgreSQL Server "base/data" recovery

2015-03-19 Thread Prajilal KP
> > I see, As there are many reasons exists for the data corruption i couldn't > > figure out it exactly. > > Unfortunately there is no backup for this system and is not possible to > > restore from the backup. > > Well, then, lost data is lost. Oh.. My bad ... > > > I have been using the NFS stor

Re: [GENERAL] Reg: PostgreSQL Server "base/data" recovery

2015-03-19 Thread Michael Paquier
On Thu, Mar 19, 2015 at 8:12 PM, Prajilal KP wrote: > I see, As there are many reasons exists for the data corruption i couldn't > figure out it exactly. > Unfortunately there is no backup for this system and is not possible to > restore from the backup. Well, then, lost data is lost. > I have b

Re: [GENERAL] Reg: PostgreSQL Server "base/data" recovery

2015-03-19 Thread Prajilal KP
Thank you Andrew for your reply. I see, As there are many reasons exists for the data corruption i couldn't figure out it exactly. Unfortunately there is no backup for this system and is not possible to restore from the backup. I have been using the NFS storage since 2013 and didn't experience th

Re: [GENERAL] Name spacing functions and stored procedures

2015-03-19 Thread Pavel Stehule
2015-03-19 11:46 GMT+01:00 Pavel Stehule : > > > 2015-03-19 11:03 GMT+01:00 Tim Uckun : > >> I guess I see schemas as ways to group data not functions. >> >> It would be very nice to be able to group your code into proper modules >> though. It's something I really miss. >> > > what is advantage mo

Re: [GENERAL] Name spacing functions and stored procedures

2015-03-19 Thread Pavel Stehule
2015-03-19 11:03 GMT+01:00 Tim Uckun : > I guess I see schemas as ways to group data not functions. > > It would be very nice to be able to group your code into proper modules > though. It's something I really miss. > what is advantage modules?

Re: [GENERAL] Name spacing functions and stored procedures

2015-03-19 Thread Thomas Kellerer
Tim Uckun schrieb am 19.03.2015 um 11:03: > I guess I see schemas as ways to group data not functions. A schema is just a namespace. The only "link" between data and a schema is that data can only live in tables and a table is associated with a namespace. Even if you use it to "group data", yo

Re: [GENERAL] Reg: PostgreSQL Server "base/data" recovery

2015-03-19 Thread Andrew Sullivan
On Thu, Mar 19, 2015 at 07:02:28PM +0900, Prajilal KP wrote: > > When i see check the this file, the file itself exists but the size is "0" > byte. That suggests you have data corruption, and that you need to restore from backup. > The server is writing the whole log in to the mounted network st

Re: [GENERAL] Name spacing functions and stored procedures

2015-03-19 Thread Tim Uckun
I guess I see schemas as ways to group data not functions. It would be very nice to be able to group your code into proper modules though. It's something I really miss. >>

Re: [GENERAL] Reg: PostgreSQL Server "base/data" recovery

2015-03-19 Thread Prajilal KP
Thank you Michael for the reply. Here is the other log from pg_log directory ERROR: could not open file "base/16384/7969143.26" (target block 13148261): No such file or directory CONTEXT: SQL statement "select min(id), max(id) from requests where id > last_max_id" PL/pgSQL function "f_raw_log

Re: [GENERAL] Reg: PostgreSQL Server "base/data" recovery

2015-03-19 Thread Michael Paquier
On Thu, Mar 19, 2015 at 5:19 PM, Prajilal KP wrote: > Recently i have noticed that my PostgreSQL server is returning the error > messages like "Could not read block 6160722 in file > "base/data/16384/11033028.47". Don't you have more details to share? There should be some hint here as well, and u

[GENERAL] Reg: PostgreSQL Server "base/data" recovery

2015-03-19 Thread Prajilal KP
Hi all, Thank you for reading this mail. I need your help to fix the issue with my PostgreSQL server. Recently i have noticed that my PostgreSQL server is returning the error messages like “Could not read block 6160722 in file “base/data/16384/11033028.47”. When i have checked the "base/data/1638

Re: [GENERAL] Unicode license compatibility with PostgreSQL license

2015-03-19 Thread Michael Paquier
On Thu, Mar 19, 2015 at 3:03 PM, Haribabu Kommi wrote: > For our next set of development activities in PostgreSQL, we want to > use the Unicode organization code with PostgreSQL to open source that > feature. Is the Unicode license is compatible with PostgreSQL. > > The following is the header tha