Re: User-defined function with anyrange[]

2018-07-06 Thread Tom Lane
Paul A Jungwirth writes: > I want to make an aggregate function range_agg(anyrange) that returns > anyrange[]. But when I try to define it, Postgres tells me it doesn't > know what an anyrange[] is. I get this error: Yeah, there is no such thing as anyrange[], nor arrays over any other pseudo-typ

Re: correcting tablespaces inside data folder

2018-07-06 Thread Duarte Carreira
On Fri, Jul 6, 2018 at 6:15 PM Magnus Hagander wrote: > (please don't top-post. It makes it hard to follow discussions) > > On Fri, Jul 6, 2018 at 7:05 PM, Duarte Carreira > wrote: > >> Magnus, >> You mean changing the symlinks inside pg_tblspc? >> >> > Yes. As long as the server is shut down, y

Re: correcting tablespaces inside data folder

2018-07-06 Thread Magnus Hagander
(please don't top-post. It makes it hard to follow discussions) On Fri, Jul 6, 2018 at 7:05 PM, Duarte Carreira wrote: > Magnus, > You mean changing the symlinks inside pg_tblspc? > > Yes. As long as the server is shut down, you can modify those symlinks. > > On Fri, Jul 6, 2018 at 5:49 PM Ma

Re: correcting tablespaces inside data folder

2018-07-06 Thread Duarte Carreira
Magnus, You mean changing the symlinks inside pg_tblspc? On Fri, Jul 6, 2018 at 5:49 PM Magnus Hagander wrote: > On Fri, Jul 6, 2018 at 6:42 PM, Duarte Carreira > wrote: > >> Hello. >> >> Yes I'm one of those guys who only recently realized the mess of having >> tablespaces inside the data dir

Re: correcting tablespaces inside data folder

2018-07-06 Thread Magnus Hagander
On Fri, Jul 6, 2018 at 6:42 PM, Duarte Carreira wrote: > Hello. > > Yes I'm one of those guys who only recently realized the mess of having > tablespaces inside the data directory... now I want to use pg_upgrade and > it will make things even worse... > > Does anyone have a best approach to this

Re: Role problem in Windows

2018-07-06 Thread Moreno Andreo
Il 06/07/2018 17:34, Melvin Davidson ha scritto: On Fri, Jul 6, 2018 at 10:01 AM, Moreno Andreo wrote: Hi, Running 9.1 on Windows 10, upgrading to 10 with

correcting tablespaces inside data folder

2018-07-06 Thread Duarte Carreira
Hello. Yes I'm one of those guys who only recently realized the mess of having tablespaces inside the data directory... now I want to use pg_upgrade and it will make things even worse... Does anyone have a best approach to this problem? Fastest/safest? pg 9.3.x on win Thanks, Duarte

Re: Role problem in Windows

2018-07-06 Thread Melvin Davidson
On Fri, Jul 6, 2018 at 10:01 AM, Moreno Andreo wrote: > Hi, > Running 9.1 on Windows 10, upgrading to 10 with pg_upgrade. > > "Once upon a time" there was a bug in our automatic role creation > procedure that did not mask vowels with accent (used in Italian language), > like "ò, è" and the result

Role problem in Windows

2018-07-06 Thread Moreno Andreo
Hi, Running 9.1 on Windows 10, upgrading to 10 with pg_upgrade. "Once upon a time" there was a bug in our automatic role creation procedure that did not mask vowels with accent (used in Italian language), like "ò, è" and the result was a role with an empty name. We are now upgrading to 10, and

How to create StartsWith function for char(n) type with ending space

2018-07-06 Thread Andrus
Hi! I need to create startswith function which returns true if char(n) database column starts with some characters which may can contain space at end. Spaces should treated like other characters. Using sample data below startswith( test, 'A') startswith( test, 'A ') StartsWith(test, rpad('A',

Re: Split daterange into sub periods

2018-07-06 Thread Alban Hertroys
On 5 July 2018 at 16:16, hmidi slim wrote: > In fact I'm trying to split a period in sub periods. Following this example > : > If I have a period =[2018-01-01, 2018-01-31] and two other periods > [2018-01-04, 2018-01-06] and [2018-01-08, 2018-01-08]. > If I split the base period '[2018-01-01, 2018

Re: How to remove elements from array .

2018-07-06 Thread Pavel Stehule
2018-07-06 11:45 GMT+02:00 Brahmam Eswar : > Hi All, > > My request is simple, > > Just browse the results from a table into an array and loop through array > results to find out to unnecessary records and delete them based on certain > business conditions and print the rest of the records. > > Be

Re: How to remove elements from array .

2018-07-06 Thread Brahmam Eswar
Hi All, My request is simple, Just browse the results from a table into an array and loop through array results to find out to unnecessary records and delete them based on certain business conditions and print the rest of the records. Below are the array results from table. {"(20310,https://go

RE: Unable to Connect to DB Instance (SOLVED)

2018-07-06 Thread Boblitz John
Good Morning, First and foremost - thank you for the info. While we still cannot determine that cause of the missing files (I see no indication of them being deleted) I was able to use a combination of touch and the "blunderbuss" to fully recreate the two databases. While it may not always be

Re: How to remove elements from array .

2018-07-06 Thread Pavel Stehule
Hi 2018-07-06 10:19 GMT+02:00 Charles Clavadetscher : > Hi > > > > *From:* Brahmam Eswar [mailto:brahmam1...@gmail.com] > *Sent:* Freitag, 6. Juli 2018 09:50 > *To:* pgsql-general ; > pgsql-hack...@postgresql.org > *Subject:* How to remove elements from array . > > > > Hi , > > > > I tried to use

Re: How to remove elements from array .

2018-07-06 Thread Pavel Stehule
Hi 2018-07-06 9:49 GMT+02:00 Brahmam Eswar : > Hi , > > I tried to use array_remove to remove elements from an array but it's > saying function doesn't exist . I'm able to use other array functions. > > 1) Capture the results with multiple columns into array . > 2) if ay results exist then loop

RE: How to remove elements from array .

2018-07-06 Thread Charles Clavadetscher
Hi From: Brahmam Eswar [mailto:brahmam1...@gmail.com] Sent: Freitag, 6. Juli 2018 09:50 To: pgsql-general ; pgsql-hack...@postgresql.org Subject: How to remove elements from array . Hi , I tried to use array_remove to remove elements from an array but it's saying function doesn't exis

How to remove elements from array .

2018-07-06 Thread Brahmam Eswar
Hi , I tried to use array_remove to remove elements from an array but it's saying function doesn't exist . I'm able to use other array functions. 1) Capture the results with multiple columns into array . 2) if ay results exist then loop through an array to find out the record with col1='Y' 3) I