Re: [GENERAL] Timezone difference between Oracle SYSDATE and PostgreSQL timestamp functions

2014-08-28 Thread John R Pierce
On 8/28/2014 10:06 PM, Vinayak wrote: Any idea how can we set OS timezone on PostgreSQL? timestamp with time zone values are stored as the equivalent of UTC and converted to the client TIME_ZONE setting for display, unless you specify some other timezone via AT TIME ZONE I'm not sure why an

[GENERAL] Timezone difference between Oracle SYSDATE and PostgreSQL timestamp functions

2014-08-28 Thread Vinayak
Hello, We have converted Oracle SYSDATE to PostgreSQL statement_timestamp() but there is a difference in timezone. SYSDATE returns the time on the server where the database instance is running(returns operating system time) so the time depends on the OS timezone setting. while the timezone of postg

Re: [GENERAL] Help related to Postgresql for RHEL 6.5

2014-08-28 Thread Alan Hodgson
On Friday, August 29, 2014 04:14:35 AM Yogesh. Sharma wrote: > Dear David, > > > Are you currently using PostgreSQL? > > Currently we are using PostgreSQL 8.1.18 version on RHEL 5.8. > Now we plan to update this to PostgreSQL 9.0 version with RHEL6.5. As in > verion 9.0 I found least Compatibili

Re: [GENERAL] Help related to Postgresql for RHEL 6.5

2014-08-28 Thread Yogesh. Sharma
Dear David, > Are you currently using PostgreSQL? Currently we are using PostgreSQL 8.1.18 version on RHEL 5.8. Now we plan to update this to PostgreSQL 9.0 version with RHEL6.5. As in verion 9.0 I found least Compatibilities. So, please guide me. Regards, Yogesh -Original Message- Fr

Re: [GENERAL] Help related to Postgresql for RHEL 6.5

2014-08-28 Thread David G Johnston
Yogesh. Sharma wrote > Compatibility issues of 9.3 are more. > So, please guide which version is suitable. Compatibility as in the multixact issues or does your software not work with 9.3 changes? What about "any supported version" and the provided link is unclear? There is no way for us to eva

Re: [GENERAL] Help related to Postgresql for RHEL 6.5

2014-08-28 Thread Yogesh. Sharma
Dear All, Compatibility issues of 9.3 are more. So, please guide which version is suitable. Regards, Yogesh -Original Message- From: Devrim Gündüz [mailto:dev...@gunduz.org] Sent: Thursday, August 28, 2014 7:34 PM To: Yogesh. Sharma Cc: pgsql-general@postgresql.org Subject: Re: [GENE

Re: [GENERAL] Deletion

2014-08-28 Thread Adrian Klaver
On 08/28/2014 04:22 AM, Ramesh T wrote: OK.. i created a function for delete customer from different tables in single database. i want rollback.. my question: where i need to place rollback ,with in a function along with deletion statements..? or after run the function .

Re: [GENERAL] Deletion

2014-08-28 Thread Adrian Klaver
On 08/28/2014 04:22 AM, Ramesh T wrote: OK.. i created a function for delete customer from different tables in single database. i want rollback.. my question: where i need to place rollback ,with in a function along with deletion statements..? or after run the function .

Re: [GENERAL] Deletion

2014-08-28 Thread David G Johnston
On Thu, Aug 28, 2014 at 9:59 AM, Ramesh T [via PostgreSQL] < ml-node+s1045698n5816744...@n5.nabble.com> wrote: > OK.. i created a function for delete customer from different tables in > single database. > > i want rollback.. > > my question: >where i need to place rollback

Re: [GENERAL] Help related to Postgresql for RHEL 6.5

2014-08-28 Thread Devrim Gündüz
Hi, On Thu, 2014-08-28 at 03:22 +, Yogesh. Sharma wrote: > I want to upgrade RHEL 5.4 to RHEL 6.5. > So, could you please let me know, which postgresql version is stable > for RHEL 6.5? Any supported PostgreSQL version is available in the yum repository: http://yum.postgresql.org You ca

Re: [GENERAL] Deletion

2014-08-28 Thread Ramesh T
OK.. i created a function for delete customer from different tables in single database. i want rollback.. my question: where i need to place rollback ,with in a function along with deletion statements..? or after run the function ..? i do not need commit.. please let me kno

[GENERAL] Help related to Postgresql for RHEL 6.5

2014-08-28 Thread Yogesh. Sharma
Dear All, I want to upgrade RHEL 5.4 to RHEL 6.5. So, could you please let me know, which postgresql version is stable for RHEL 6.5? Regards, Yogesh DISCLAIMER: --- The contents

Re: [GENERAL] select top_countries and for each country, select top_cities in that country, in 1 query

2014-08-28 Thread Dorian Hoxha
Thanks John. On Thu, Aug 28, 2014 at 2:35 PM, John McKown wrote: > On Mon, Aug 18, 2014 at 10:52 AM, John McKown > wrote: > > > > SELECT avg(b.countcountry)::int as "CountryCount", b.country, a.city, > > count(a.city) as "CityCount" > > FROM t AS a > > INNER JOIN > > (SELECT COUNT(country) AS

Re: [GENERAL] select top_countries and for each country, select top_cities in that country, in 1 query

2014-08-28 Thread John McKown
On Mon, Aug 18, 2014 at 10:52 AM, John McKown wrote: > > SELECT avg(b.countcountry)::int as "CountryCount", b.country, a.city, > count(a.city) as "CityCount" > FROM t AS a > INNER JOIN > (SELECT COUNT(country) AS countcountry, country FROM t GROUP BY country) AS > b > ON a.country = b.country > GR

[GENERAL] Failback to old master

2014-08-28 Thread Maeldron T.
Hello, I swear I have read a couple of old threads. Yet I am not sure if it safe to failback to the old master in case of async replication without base backup. Considering: I have the latest 9.3 server A: master B: slave B is actively connected to A I shut down A manually with -m fast (it's the