Re: [GENERAL] NULL concatenation

2016-05-12 Thread George Neuner
On Fri, 13 May 2016 08:45:46 +0530, Sridhar N Bamandlapally wrote: >we need simple concatenation of all variables(which values may come NULL or >valid-values based on functional process), > >coalesce is different functionality As Pavel suggested, concat will work, but it swallows NULLs leaving n

[GENERAL] Share my experience and Thank you !

2016-05-12 Thread JingYuan Chen
Hello, I want to share my experience about one of my projects and say thank you to the community. Scenario : My company's ERP system is SAP and rent a procurement system for bid. It's architecture bases on Webshpere5 and Oracle and IBM Java 1.4. The provider informed us that they decide to close

Re: [GENERAL] NULL concatenation

2016-05-12 Thread Sridhar N Bamandlapally
Hi Adam we need simple concatenation of all variables(which values may come NULL or valid-values based on functional process), coalesce is different functionality Thanks Sridhar OpenText On Thu, May 12, 2016 at 4:56 PM, Adam Pearson < adam.pear...@realisticgames.co.uk> wrote: > Hello Sridhar,

Re: [GENERAL] Thoughts on "Love Your Database"

2016-05-12 Thread Marc Mamin
>What might I cover that I haven't mentioned? >What are the usual objections to server-side code and how can they be met? >When *are* they justified and what should the criteria be to put code in >Postgres? Any other thoughts? Hi, For my point of view, scalability considerations and possible pe

Re: [GENERAL] downloaded 9.1 pg driver but odbcad32 doesnt see it

2016-05-12 Thread Adrian Klaver
On 05/12/2016 09:30 AM, db042190 wrote: Hi. I downloaded a driver for 9.1 from https://jdbc.postgresql.org/download.html and see a jar file that was downloaded. I went to odbcad32 to add a dsn but odbcad32 doesnt see a driver for pg. What steps am i missing? I am not seeing any steps that wi

Re: [GENERAL] index on ILIKE/LIKE - PostgreSQL 9.2

2016-05-12 Thread Lucas Possamai
> > With those sizes, the gin index will probably be naturally kept mostly > in the file-system cache, if it is used regularly. So the original > slowness of your first query is likely just a cold-cache problem. Can > you generate a stream of realistic queries and see what it stabilizes > at? > >

[GENERAL] ON CONFLICT DO for UPDATE statements

2016-05-12 Thread Klaus P. Pieper - ibeq GmbH
We run two separate databases which are synchronized through our own replication system (two master databases, so we use our own trigger based methods). Let's call the two databases "main" and "remote". >From time to time we get constraint violations on sorting fields classified >UNIQUE when us

Re: [GENERAL] Update or Delete causes canceling of long running slave queries

2016-05-12 Thread Jeff Janes
On Thu, May 12, 2016 at 11:14 AM, Viswanath wrote: > Hi Jeff, > Yes I am turning off autovacuum for experimental purpose only. I was > curious to know what is causing the queries to be killed when the autovacuum > is not running. I guess it had to be the pruning of HOT update chains like > you ha

[GENERAL] ON CONFLICT DO for UPDATE statements

2016-05-12 Thread Klaus P. Pieper
We run two separate databases which are synchronized through our own replication system (two master databases, so we use our own trigger based methods). Let's call the two databases "main" and "remote". >From time to time we get constraint violations on sorting fields classified UNIQUE when user

Re: [GENERAL] Update or Delete causes canceling of long running slave queries

2016-05-12 Thread Viswanath
Hi Jeff, Yes I am turning off autovacuum for experimental purpose only. I was curious to know what is causing the queries to be killed when the autovacuum is not running. I guess it had to be the pruning of HOT update chains like you have mentioned. Also I have already tried changing the parameter

Re: [GENERAL] Update or Delete causes canceling of long running slave queries

2016-05-12 Thread Viswanath
Hi, I am using postgres 9.5 Yes,I restarted the server after changing the autovacuum to off. Also verified that autovacuum process is not running. standby db configurations: (mostly default conf only) hot_standby = on max_standby_archive_delay = 30s max_standby_streaming_delay = 30s wal_receiver_s

Re: [GENERAL] downloaded 32 bit pg 9.1 but driver isnt seeing some rows

2016-05-12 Thread db042190
i had the wrong ip address. I'm ok. -- View this message in context: http://postgresql.nabble.com/downloaded-32-bit-pg-9-1-but-driver-isnt-seeing-some-rows-tp5903332p5903338.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list (p

Re: [GENERAL] downloaded 32 bit pg 9.1 but driver isnt seeing some rows

2016-05-12 Thread db042190
i now see that the ip address may have been wrong. I'll post back here. -- View this message in context: http://postgresql.nabble.com/downloaded-32-bit-pg-9-1-but-driver-isnt-seeing-some-rows-tp5903332p5903336.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Se

[GENERAL] downloaded 32 bit pg 9.1 but driver isnt seeing some rows

2016-05-12 Thread db042190
Hi I downloaded pg 32 bit 9.1. I noticed the list of drivers the install referenced didnt look like 9.1 but i selected all and continued anyway. When i run a select distinct query against one of my existing tables on a pre existing 9.1 pg server some values that i know are there dont show. Speci

Re: [GENERAL] Update or Delete causes canceling of long running slave queries

2016-05-12 Thread Jeff Janes
On Thu, May 12, 2016 at 6:37 AM, Viswanath wrote: > Hi, > I have the following configurations. > > On master: > autovacuum=off > vacuum_defer_cleanup_age=0 > > On slave: > hot_standby_feedback = off > max_standby_streaming_delay = 30s > > Now when I try to run a long query on slave and do some up

Re: [GENERAL] Update or Delete causes canceling of long running slave queries

2016-05-12 Thread Sameer Kumar
On Thu, 12 May 2016 21:56 Viswanath, wrote: > Hi, > I have the following configurations. > > On master: > autovacuum=off > Have you changed it recently or it has always been off? In case you changed it recently, a restart would be needed for this setting to take effect. vacuum_defer_cleanup_age

[GENERAL] downloaded 9.1 pg driver but odbcad32 doesnt see it

2016-05-12 Thread db042190
Hi. I downloaded a driver for 9.1 from https://jdbc.postgresql.org/download.html and see a jar file that was downloaded. I went to odbcad32 to add a dsn but odbcad32 doesnt see a driver for pg. What steps am i missing? -- View this message in context: http://postgresql.nabble.com/downloaded-

[GENERAL] Update or Delete causes canceling of long running slave queries

2016-05-12 Thread Viswanath
Hi, I have the following configurations. On master: autovacuum=off vacuum_defer_cleanup_age=0 On slave: hot_standby_feedback = off max_standby_streaming_delay = 30s Now when I try to run a long query on slave and do some update or delete on the table on master I am getting the following error.

Re: [GENERAL] index on ILIKE/LIKE - PostgreSQL 9.2

2016-05-12 Thread Jeff Janes
On Wed, May 11, 2016 at 11:59 PM, Lucas Possamai wrote: > >> >> How big is the table? The gin index? shared_buffers? RAM? What >> kind of IO system do you have, and how many other things were going on >> with it? > > > - Just a reminder that I'm not running these tests on my prod server.. I'm

Re: [GENERAL] Release Notes Link is broken on the website

2016-05-12 Thread Adrian Klaver
On 05/12/2016 06:48 AM, Daniel Westermann wrote: just to let you know: This link is broken: http://www.postgresql.org/docs/9./static/release-9-6.html The description on the website is wrong: PostgreSQL 9.6 Beta 1, 9.5.2, 9.4.7, 9.3.12, 9.2.16 and 9.1.21 Released! Shoud be 9.5.3, shouldn't it?

Re: [GENERAL] Release Notes Link is broken on the website

2016-05-12 Thread Raymond O'Donnell
On 12/05/2016 15:01, Daniel Westermann wrote: >>> >>>Provide a link to the source document where you found the link you > have posted > > its the homepage > > http://www.postgresql.org > Looks like the link URL is missing a "6": http://www.postgresql.org/docs/9./static/release-9-6.html

Re: [GENERAL] Release Notes Link is broken on the website

2016-05-12 Thread Igor Neyman
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Allan Kamau Sent: Thursday, May 12, 2016 9:59 AM To: Daniel Westermann Cc: Postgres General Postgres General Subject: Re: [GENERAL] Release Notes Link is broken on the website Provide a link to th

Re: [GENERAL] Release Notes Link is broken on the website

2016-05-12 Thread Adrian Klaver
On 05/12/2016 06:58 AM, Allan Kamau wrote: Provide a link to the source document where you found the link you have posted. Following up on Daniel's post I went to: http://www.postgresql.org/ which is where the release announcement is. Allan. On Thu, May 12, 2016 at 4:48 PM, Daniel Westerm

Re: [GENERAL] Release Notes Link is broken on the website

2016-05-12 Thread Daniel Westermann
>> >>Provide a link to the source document where you found the link you have >>posted its the homepage http://www.postgresql.org

Re: [GENERAL] Release Notes Link is broken on the website

2016-05-12 Thread Allan Kamau
Provide a link to the source document where you found the link you have posted. Allan. On Thu, May 12, 2016 at 4:48 PM, Daniel Westermann < daniel.westerm...@dbi-services.com> wrote: > just to let you know: > > This link is broken: > http://www.postgresql.org/docs/9./static/release-9-6.html > >

[GENERAL] Release Notes Link is broken on the website

2016-05-12 Thread Daniel Westermann
just to let you know: This link is broken: http://www.postgresql.org/docs/9./static/release-9-6.html The description on the website is wrong: PostgreSQL 9.6 Beta 1, 9.5.2, 9.4.7, 9.3.12, 9.2.16 and 9.1.21 Released! Shoud be 9.5.3, shouldn't it? Cheers, Daniel

Re: [GENERAL] Alternate or Optimization for with hold cursor

2016-05-12 Thread Mike Sofen
>From: Sangeetha Sent: Thursday, May 12, 2016 1:58 AM Currently , I am using "With hold" cursor. In our case , the With hold cursor is used to fetch the next record of the given primary key . The performance is very slow for large data set. Can you provide me some alternative ways like having own

Re: [GENERAL] Alternate or Optimization for with hold cursor

2016-05-12 Thread amulsul
Not sure what you trying to achieve, you could give a try for Materialized Views[1], see would this help you or not. 1. http://www.postgresql.org/docs/9.3/static/rules-materializedviews.html 2. http://www.postgresql.org/docs/9.3/static/sql-creatematerializedview.html Regards, Amul Sul -- View

Re: [GENERAL] NULL concatenation

2016-05-12 Thread Adam Pearson
Hello Sridhar, Have you tried the 'coalesce' function to handle the nulls? Kind Regards, Adam Pearson From: pgsql-general-ow...@postgresql.org on behalf of Sridhar N Bamandlapally Sent: 12 May 2016 09:47 To: PG-General Mailing List; PostgreSQL-hackers Subj

Re: [GENERAL] Alternate or Optimization for with hold cursor

2016-05-12 Thread Rakesh Kumar
On May 12, 2016, at 4:57 AM, sangeetha wrote: Currently , I am using "With hold" cursor. In our case , the With hold cursor is used to fetch the next record of the given primary key . Can you explain your use case. If i understand with hold correctly, it is typically used to preserve locks ev

[GENERAL] Alternate or Optimization for with hold cursor

2016-05-12 Thread sangeetha
Currently , I am using "With hold" cursor. In our case , the With hold cursor is used to fetch the next record of the given primary key . The performance is very slow for large data set. Can you provide me some alternative ways like having own copy of table , or optimization for With hold cursor?

Re: [GENERAL] [HACKERS] NULL concatenation

2016-05-12 Thread Sridhar N Bamandlapally
Thanks Pavel Great !! I was thinking both || and CANCAT does same Thanks again - Sridhar OpenText On Thu, May 12, 2016 at 2:22 PM, Pavel Stehule wrote: > Hi > > 2016-05-12 10:47 GMT+02:00 Sridhar N Bamandlapally > : > >> Hi >> >> In migration, am facing issue with NULL concatenation in plp

Re: [GENERAL] NULL concatenation

2016-05-12 Thread Tim Clarke
Wrap the source columns in your line: txt:= txt1 || txt2 || txt3; in coalesce() calls Tim Clarke On 12/05/16 09:47, Sridhar N Bamandlapally wrote: > txt:= txt1 || txt2 || txt3; smime.p7s Description: S/MIME Cryptographic Signature

Re: [GENERAL] [HACKERS] NULL concatenation

2016-05-12 Thread Pavel Stehule
Hi 2016-05-12 10:47 GMT+02:00 Sridhar N Bamandlapally : > Hi > > In migration, am facing issue with NULL concatenation in plpgsql, > by concatenating NULL between any where/position to Text / Varchar, the > total string result is setting value to NULL > > > *In Oracle:* > > declare > txt1 VAR

[GENERAL] NULL concatenation

2016-05-12 Thread Sridhar N Bamandlapally
Hi In migration, am facing issue with NULL concatenation in plpgsql, by concatenating NULL between any where/position to Text / Varchar, the total string result is setting value to NULL *In Oracle:* declare txt1 VARCHAR2(100) := 'ABCD'; txt2 VARCHAR2(100) := NULL; txt3 VARCHAR2(100)

Re: [GENERAL] index on ILIKE/LIKE - PostgreSQL 9.2

2016-05-12 Thread Andreas Joseph Krogh
På torsdag 12. mai 2016 kl. 10:05:01, skrev Andreas Joseph Krogh < andr...@visena.com >: [snp] I created this test:   create table ja_jobs(id bigserial primary key, title varchar not null, clientid bigint not null, time_job bigint not null); CREATE INDEX ix_ja_jobs_trgm_

Re: [GENERAL] index on ILIKE/LIKE - PostgreSQL 9.2

2016-05-12 Thread Andreas Joseph Krogh
På torsdag 12. mai 2016 kl. 09:57:58, skrev Andreas Joseph Krogh < andr...@visena.com >: På torsdag 12. mai 2016 kl. 02:30:33, skrev Lucas Possamai < drum.lu...@gmail.com >: Hi there!   I've got a simple but slow query:    SELECT DISTINCT titl

Re: [GENERAL] index on ILIKE/LIKE - PostgreSQL 9.2

2016-05-12 Thread Andreas Joseph Krogh
På torsdag 12. mai 2016 kl. 02:30:33, skrev Lucas Possamai mailto:drum.lu...@gmail.com>>: Hi there!   I've got a simple but slow query:    SELECT DISTINCT title   FROM ja_jobs WHERE title ILIKE '%RYAN WER%' and clientid = 31239  AND time_job > 1457826264 order BY title limit 10   Explain analy

Re: [GENERAL] index on ILIKE/LIKE - PostgreSQL 9.2

2016-05-12 Thread Lucas Possamai
> How big is the table? The gin index? shared_buffers? RAM? What > kind of IO system do you have, and how many other things were going on > with it? > - Just a reminder that I'm not running these tests on my prod server.. I'm running on my test server. So the confs will be different The table