Re: [GENERAL] LEFT and RIGHT JOIN

2012-06-29 Thread Misa Simic
Thanks Salah, David on your detailed answers... I will need to change my mindset to just read tables from left to right... I thought INNER has advantage to OUTER regardles in which order are tables in the query... And just take data from LEFT or RIGHT... So basically, if there is t1 left join t2

Re: [GENERAL] LEFT and RIGHT JOIN

2012-06-29 Thread Tom Lane
Misa Simic writes: > Yes you are right... I wanted: t1 left join (t2 inner join t3) > Is there a way to "say" that? Sure, just add the parentheses. t1 left join (t2 inner join t3 on t2-t3-condition) on t1-t2-condition > I mean to me, it is logical and without > brackets... i.e. t1 left

Re: [GENERAL] LEFT and RIGHT JOIN

2012-06-29 Thread Misa Simic
Thanks Tom, Yes you are right... I wanted: t1 left join (t2 inner join t3) Is there a way to "say" that? I mean to me, it is logical and without brackets... i.e. t1 left join t2 inner join t3 left join t4, I would read as: t1 left join (t2 inner join t3) left join t4 (Like INNER has advantage

Re: [GENERAL] Promotion of standby to master

2012-06-29 Thread Ben Chobot
On Jun 29, 2012, at 12:16 PM, Andy Chambers wrote: > I understand that it's possible to promote a "hot standby" pg server > simply by creating the failover file. In a scenario where there are > multiple standby servers, is it possible to point the other standby > servers to the new master without

Re: [GENERAL] Catalog Bloat in Development - Frequently dropping/adding schemas and objects

2012-06-29 Thread Ben Madin
David, the VACUUM FULL VERBOSE command might overcome this - I believe it works by effectively doing what you are proposing with a drop database and recreate. It does however lock the tables during the process (not a problem in a dev environ one assumes) but may not be ideal on a live database.

Re: [GENERAL] LEFT and RIGHT JOIN

2012-06-29 Thread David Johnston
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Misa Simic Sent: Friday, June 29, 2012 5:36 PM To: pgsql Subject: [GENERAL] LEFT and RIGHT JOIN Hi, I have met some strange situation... Could someone explain difference between LEFT and RIGHT JOI

Re: [GENERAL] LEFT and RIGHT JOIN

2012-06-29 Thread Tom Lane
Misa Simic writes: > If we run query: > SELECT t1.sometext AS c1, t2.sometext AS c2, t3.sometext AS c3 > FROM > t1 > *LEFT* JOIN t2 ON t1.id = t2.id > INNER JOIN t3 ON t2.id = t3.id > Result is unexpected to me: > but if we run > SELECT t1.sometext AS c1, t2.sometext AS c2, t3.sometext AS c3

[GENERAL] LEFT and RIGHT JOIN

2012-06-29 Thread Misa Simic
Hi, I have met some strange situation... Could someone explain difference between LEFT and RIGHT JOIN? I thought it is just from whitch side we are looking in JOIN columns part... but it seems that is not the case I have three Tables with the same structure... CREATE TABLE t1 ( id integer

[GENERAL] Catalog Bloat in Development - Frequently dropping/adding schemas and objects

2012-06-29 Thread David Johnston
In my current development environment I often drop some or all of the schemas in the database and then re-create them schemas and the objects they contain. When I go to bring up the database in my GUI it takes a considerable amount of time to initialize. I suspect this is because the catalog tabl

[GENERAL] Promotion of standby to master

2012-06-29 Thread Andy Chambers
I understand that it's possible to promote a "hot standby" pg server simply by creating the failover file.  In a scenario where there are multiple standby servers, is it possible to point the other standby servers to the new master without creating a new base backup? When I tried to do this, I ran

Re: [GENERAL] Conversion of columns during CSV Import

2012-06-29 Thread Edson Richter
Em 29/06/2012 14:10, Raymond O'Donnell escreveu: On 29/06/2012 08:54, Patrick Schneider wrote: Hello, is there any possibility to convert special columns during an CSV import via COPY? For example: HELLO;WORLD;;011001 should be converted to a character field 011001 to the date 10th J

Re: [GENERAL] Conversion of columns during CSV Import

2012-06-29 Thread Alban Hertroys
On 29 Jun 2012, at 9:54, Patrick Schneider wrote: > Hello, > > is there any possibility to convert special columns during an CSV import via > COPY? > For example: > > HELLO;WORLD;;011001 > > should be converted to a character field > 011001 to the date 10th January 2001 > > For the m

Re: [GENERAL] Conversion of columns during CSV Import

2012-06-29 Thread Steve Crawford
On 06/29/2012 12:54 AM, Patrick Schneider wrote: Hello, is there any possibility to convert special columns during an CSV import via COPY? For example: HELLO;WORLD;;011001 should be converted to a character field 011001 to the date 10th January 2001 For the moment the only idea we

Re: [GENERAL] Conversion of columns during CSV Import

2012-06-29 Thread Raymond O'Donnell
On 29/06/2012 08:54, Patrick Schneider wrote: > Hello, > > is there any possibility to convert special columns during an CSV import > via COPY? > For example: > > HELLO;WORLD;;011001 > > should be converted to a character field > 011001 to the date 10th January 2001 > > For the moment

Re: [GENERAL] Notiffy problem

2012-06-29 Thread Tom Lane
Merlin Moncure writes: > On Fri, Jun 29, 2012 at 8:58 AM, adasko98 wrote: Notify demoApp, n_user ;>> Looks like a limitation of the plpgsql parser, perhaps even counts as a >>> bug. It is not a bug, but a documented limitation of the NOTIFY command: the payload

[GENERAL] Conversion of columns during CSV Import

2012-06-29 Thread Patrick Schneider
Hello, is there any possibility to convert special columns during an CSV import via COPY? For example: HELLO;WORLD;;011001 should be converted to a character field 011001 to the date 10th January 2001 For the moment the only idea we have is, to import the CSV into a TEMP table and

Re: [GENERAL] Notiffy problem

2012-06-29 Thread Merlin Moncure
On Fri, Jun 29, 2012 at 8:58 AM, adasko98 wrote: > > On Fri, Jun 29, 2012 at 3:29 AM, Richard Huxton wrote: >> On 29/06/12 09:01, adasko98 wrote: >>> >>> Hi >>> In first sorry for my english :) I have got a problem with >>> notify/listener. >>> I do a function which returns a trigger. Everything

Re: [GENERAL] Postgresql 9.0.6 alway run VACUUM ANALYZE pg_catalog.pg_attribute

2012-06-29 Thread Kevin Grittner
tuanhoanganh wrote: > VACUUM ANALYZE pg_catalog.pg_attribute, pg_catalog.pg_type, > pg_catalog.pg_depend run all time of day. > > Is it normal in Postgres? Do you create and drop a lot of tables (including temporary tables)? What are the results of running the query on this page?: http://

Re: [GENERAL] Regarding parallel running of 9.1 and 9.2beta2

2012-06-29 Thread Atri Sharma
On Fri, Jun 29, 2012 at 7:05 PM, Atri Sharma wrote: > On Fri, Jun 29, 2012 at 7:01 PM, Merlin Moncure wrote: >> On Fri, Jun 29, 2012 at 6:57 AM, Atri Sharma wrote: >>> On Fri, Jun 29, 2012 at 5:12 PM, Albe Laurenz >>> wrote: Atri Sharma wrote: > I am running PostgreSQL 9.1 currently a

Re: [GENERAL] Notiffy problem

2012-06-29 Thread adasko98
On Fri, Jun 29, 2012 at 3:29 AM, Richard Huxton wrote: > On 29/06/12 09:01, adasko98 wrote: >> >> Hi >> In first sorry for my english :) I have got a problem with >> notify/listener. >> I do a function which returns a trigger. Everything is ok but when i want >> send in a second parameter a varia

Re: [GENERAL] Notiffy problem

2012-06-29 Thread Merlin Moncure
On Fri, Jun 29, 2012 at 3:29 AM, Richard Huxton wrote: > On 29/06/12 09:01, adasko98 wrote: >> >> Hi >> In first sorry for my english :) I have got a problem with >> notify/listener. >> I do a function which returns a trigger. Everything is ok but when i want >> send in a second parameter a variab

Re: [GENERAL] Regarding parallel running of 9.1 and 9.2beta2

2012-06-29 Thread Atri Sharma
On Fri, Jun 29, 2012 at 7:01 PM, Merlin Moncure wrote: > On Fri, Jun 29, 2012 at 6:57 AM, Atri Sharma wrote: >> On Fri, Jun 29, 2012 at 5:12 PM, Albe Laurenz >> wrote: >>> Atri Sharma wrote: I am running PostgreSQL 9.1 currently and I want to run 9.2beta2 simultaneously with it.Is it

Re: [GENERAL] Regarding parallel running of 9.1 and 9.2beta2

2012-06-29 Thread Merlin Moncure
On Fri, Jun 29, 2012 at 6:57 AM, Atri Sharma wrote: > On Fri, Jun 29, 2012 at 5:12 PM, Albe Laurenz wrote: >> Atri Sharma wrote: >>> I am running PostgreSQL 9.1 currently and I want to run 9.2beta2 >>> simultaneously with it.Is it possible? >>> >>> I downloaded the 9.2beta2 sources,untared them a

Re: [GENERAL] Regarding parallel running of 9.1 and 9.2beta2

2012-06-29 Thread Atri Sharma
On Fri, Jun 29, 2012 at 5:12 PM, Albe Laurenz wrote: > Atri Sharma wrote: >> I am running PostgreSQL 9.1 currently and I want to run 9.2beta2 >> simultaneously with it.Is it possible? >> >> I downloaded the 9.2beta2 sources,untared them and ran >> ./configure,make and make install without uninstal

Re: [GENERAL] Regarding parallel running of 9.1 and 9.2beta2

2012-06-29 Thread Albe Laurenz
Atri Sharma wrote: > I am running PostgreSQL 9.1 currently and I want to run 9.2beta2 > simultaneously with it.Is it possible? > > I downloaded the 9.2beta2 sources,untared them and ran > ./configure,make and make install without uninstalling 9.1. > > Now,when I am running pg_ctl start,I am getti

Re: [GENERAL] Regarding parallel running of 9.1 and 9.2beta2

2012-06-29 Thread Atri Sharma
On Fri, Jun 29, 2012 at 4:21 PM, Atri Sharma wrote: > On Fri, Jun 29, 2012 at 4:20 PM, raghu ram wrote: >>> Thanks Raghu. >>> >>> BTW,could you solve my other(makefile) issue please? >>> >>> Atri >>> >>> >> Sorry about Makefile issue, someone would have better solution on it.. >> >> -Raghu Ram >>

Re: [GENERAL] Regarding parallel running of 9.1 and 9.2beta2

2012-06-29 Thread Atri Sharma
On Fri, Jun 29, 2012 at 4:20 PM, raghu ram wrote: >> Thanks Raghu. >> >> BTW,could you solve my other(makefile) issue please? >> >> Atri >> >> > Sorry about Makefile issue, someone would have better solution on it.. > > -Raghu Ram > > > No problem,thanks a lot for your help! Atri -- Regards,

Re: [GENERAL] Regarding parallel running of 9.1 and 9.2beta2

2012-06-29 Thread raghu ram
> > Thanks Raghu. > > BTW,could you solve my other(makefile) issue please? > > Atri > > > Sorry about Makefile issue, someone would have better solution on it.. -Raghu Ram

Re: [GENERAL] Regarding parallel running of 9.1 and 9.2beta2

2012-06-29 Thread Atri Sharma
On Fri, Jun 29, 2012 at 3:36 PM, raghu ram wrote: >> >> Hi John, >> >> What values should I be setting in PGDATA and PGPORT? >> > > Below URL provides more information on this: > > http://www.postgresql.org/docs/9.1/static/libpq-envars.html > > -- > > Thanks & Regards, > > Raghu Ram > > > Thanks R

Re: [GENERAL] Regarding parallel running of 9.1 and 9.2beta2

2012-06-29 Thread raghu ram
> > > Hi John, > > What values should I be setting in PGDATA and PGPORT? > > Below URL provides more information on this: http://www.postgresql.org/docs/9.1/static/libpq-envars.html -- Thanks & Regards, Raghu Ram

Re: [GENERAL] Regarding parallel running of 9.1 and 9.2beta2

2012-06-29 Thread Atri Sharma
On Fri, Jun 29, 2012 at 3:14 PM, Atri Sharma wrote: > On Fri, Jun 29, 2012 at 2:37 PM, John R Pierce wrote: >> On 06/29/12 1:43 AM, raghu ram wrote: >>> >>> >>> and then you can build both from scratch and install them independently >> >> >> >> in case noone has made this clear, use different --p

Re: [GENERAL] Starting a cluster as a service

2012-06-29 Thread Léa Massiot
Hello Raghavendra, Sorry for the late answer, I couldn't test this properly before. That indeed solves the problem. Thank you and best regards. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Starting-a-cluster-as-a-service-tp5712728p5714759.html Sent from the PostgreSQL

Re: [GENERAL] Regarding parallel running of 9.1 and 9.2beta2

2012-06-29 Thread Atri Sharma
On Fri, Jun 29, 2012 at 2:37 PM, John R Pierce wrote: > On 06/29/12 1:43 AM, raghu ram wrote: >> >> >> and then you can build both from scratch and install them independently > > > > in case noone has made this clear, use different --prefix= paths on the > ./configure line, and when you're running

Re: [GENERAL] Regarding parallel running of 9.1 and 9.2beta2

2012-06-29 Thread John R Pierce
On 06/29/12 1:43 AM, raghu ram wrote: and then you can build both from scratch and install them independently in case noone has made this clear, use different --prefix= paths on the ./configure line, and when you're running initdb and starting the database server, specify different $PGPORT

Re: [GENERAL] Regarding parallel running of 9.1 and 9.2beta2

2012-06-29 Thread raghu ram
Hi Raghu, > > Thanks for your reply. > > I ran make install in my 9.1 directory again,and this time,the server > started but is giving errors in running the code which was running > earlier.Could you tell me a way in which I could remove both 9.1 and > 9.2beta2 and build both from scratch and insta

Re: [GENERAL] Regarding parallel running of 9.1 and 9.2beta2

2012-06-29 Thread Atri Sharma
On Fri, Jun 29, 2012 at 2:02 PM, raghu ram wrote: > > > On Fri, Jun 29, 2012 at 1:47 PM, Atri Sharma wrote: >> >> Hi, >> >> I am running PostgreSQL 9.1 currently and I want to run 9.2beta2 >> simultaneously with it.Is it possible? >> > > Yes, You can have multiple  PostgreSQL versions on same hos

Re: [GENERAL] Notiffy problem

2012-06-29 Thread adasko98
Thanks for your answer. Now it works. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Notiffy-problem-tp5714744p5714750.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To m

Re: [GENERAL] Regarding parallel running of 9.1 and 9.2beta2

2012-06-29 Thread raghu ram
On Fri, Jun 29, 2012 at 1:47 PM, Atri Sharma wrote: > Hi, > > I am running PostgreSQL 9.1 currently and I want to run 9.2beta2 > simultaneously with it.Is it possible? > > Yes, You can have multiple PostgreSQL versions on same host. I downloaded the 9.2beta2 sources,untared them and ran > ./con

Re: [GENERAL] Notiffy problem

2012-06-29 Thread Richard Huxton
On 29/06/12 09:01, adasko98 wrote: Hi In first sorry for my english :) I have got a problem with notify/listener. I do a function which returns a trigger. Everything is ok but when i want send in a second parameter a variable NOTIFY say: "syntax error" Notify demoApp, 'some text';

[GENERAL] Regarding parallel running of 9.1 and 9.2beta2

2012-06-29 Thread Atri Sharma
Hi, I am running PostgreSQL 9.1 currently and I want to run 9.2beta2 simultaneously with it.Is it possible? I downloaded the 9.2beta2 sources,untared them and ran ./configure,make and make install without uninstalling 9.1. Now,when I am running pg_ctl start,I am getting the following error: pg

[GENERAL] Notiffy problem

2012-06-29 Thread adasko98
Hi In first sorry for my english :) I have got a problem with notify/listener. I do a function which returns a trigger. Everything is ok but when i want send in a second parameter a variable NOTIFY say: "syntax error" This is works example with no variable: CREATE OR REPLACE FUNCTION notify_demo

Re: [GENERAL] function lookup using a "real" function call

2012-06-29 Thread raghu ram
On Thu, Jun 28, 2012 at 3:30 PM, Marc Mamin wrote: > > Hello, > > Is it possible to find out the (list of) function oids from a function > call? > > e.g. select MYFUNC('foo', 1234) > > => someting like > > select * from get_function_oids($$MYFUNC('foo', 1234)$$) > > > Below approach provides info

Re: [GENERAL] Postgresql 9.0.6 alway run VACUUM ANALYZE pg_catalog.pg_attribute

2012-06-29 Thread tuanhoanganh
Yes I have more than 10 activity connect on the database. But VACUUM ANALYZE pg_catalog.pg_attribute, pg_catalog.pg_type, pg_catalog.pg_depend run all time of day. Is it normal in Postgres? Tuan Hoang Anh On Fri, Jun 29, 2012 at 1:34 AM, Jeff Davis wrote: > On Thu, 2012-06-28 at 21:41 +0700,