Re: [ADMIN] need help to write a function in postgresql

2012-08-03 Thread Craig Ringer
On 08/03/2012 04:37 PM, Laszlo Nagy wrote: It is also better because with a view, you can also do " name is null ". But you cannot do that with a function (unless you write unnecessary circumstancial code.) While I agree with you on the view - among other things, it lets the query optimiser p

Re: [ADMIN] need help to write a function in postgresql

2012-08-03 Thread Laszlo Nagy
Then you can do: select * from retrieve_user('foo', 'bar'); Personally I'd prefer to create view that wraps that select statement and then simply do a select * from user_view where name = 'foo' and password = 'bar' It is also better because with a view, you can also d

Re: [ADMIN] need help to write a function in postgresql

2012-07-19 Thread Albe Laurenz
Madhu.Lanka wrote: > Can u please help to write a function for the following scenario? > "select [...] from [...] where [...] and p.name=? and p.password=?" Don't use "?" for the parameters. Use "$1" for the first parameter and "$2" for the second. Yours, Laurenz Albe -- Sent via pgsql-admin m

Re: [ADMIN] need help to write a function in postgresql

2012-07-19 Thread Thomas Kellerer
Madhu.Lanka, 19.07.2012 11:14: Hi Friends Can u please help to write a function for the following scenario? I have 3 table’s user_roles, principals and roles. I have to write a function in postgresql which should excepts 2 parameters (name, password) With those 2 parameters the query should

[ADMIN] need help to write a function in postgresql

2012-07-19 Thread Madhu.Lanka
Hi Friends Can u please help to write a function for the following scenario? I have 3 table's user_roles, principals and roles. I have to write a function in postgresql which should excepts 2 parameters (name, password) With those 2 parameters the query should be executed and return the r

Re: [ADMIN] Need help in Postgres log shipping replication

2011-07-06 Thread Ray Stell
On Wed, Jul 06, 2011 at 07:34:11PM +0530, Jahnavi Chintakunta wrote: > > > When the standy server is stopped, then the pg_xlog's in the master server > are stagnant. Sorry, I've never seen this before. What is archive_timeout set to? template1=# show archive_timeout; archive_timeout

Re: [ADMIN] Need help in Postgres log shipping replication

2011-07-06 Thread Jahnavi Chintakunta
-Original Message- From: Jahnavi Chintakunta Sent: Wednesday, July 06, 2011 10:03 PM To: 'Ray Stell' Subject: RE: [ADMIN] Need help in Postgres log shipping replication Thanks Ray for the reply. Actually I am testing replication in a test Database & I'm the sole

Re: [ADMIN] Need help in Postgres log shipping replication

2011-07-06 Thread Ray Stell
On Wed, Jul 06, 2011 at 03:02:22PM +0530, Jahnavi Chintakunta wrote: > > But these files are getting copied continuously and they are not stopping. > > Master is generating pg_xlog files even when there is no activity on the > database. How did you determine there was no activity? Have you que

[ADMIN] Need help in Postgres log shipping replication

2011-07-06 Thread Jahnavi Chintakunta
We are having a huge database and need replication with load balancing for Postgres 9.0 We have chose Log shipping method for replication and trying out that approach. Based on the method given for Log shipping, I have configured the following On Master server the following parameters are set

Re: [ADMIN] Need help in enabling remote connection

2009-11-03 Thread Kevin Grittner
Scott Marlowe wrote: >> -- Dear Ian Lea, i guess 10.0.0.1/24 is the same as 10.0.0.0/24 >> as the mask '24' means that the first 3 octets (24 bits from the >> left hand side) must match ie both mean simply 10.0.0.* > > Actually 10.0.0.0/24 means that the right hand 24 bits don't matter, > so

Re: [ADMIN] Need help in enabling remote connection

2009-11-03 Thread Scott Marlowe
On Tue, Nov 3, 2009 at 1:53 AM, Shruthi A wrote: > Hi all, > > Thanks a lot for all your replies.  The problem is solved now.  This is the > correct thing to do:    listen_addresses = '*' > And then restart the service. > > Additional notes: > -- Remember to use single quotes around the * else it

Re: [ADMIN] Need help in enabling remote connection

2009-11-03 Thread Tim Bruce - Postgres
On Tue, November 3, 2009 10:10, Scott Marlowe wrote: > On Tue, Nov 3, 2009 at 1:53 AM, Shruthi A wrote: >> Hi all, >> >> -- Once this service is started, telneting the server on the given port >> successfully connects. >> -- Dear Ian Lea, i guess 10.0.0.1/24  is the same as 10.0.0.0/24  as the >>

Re: [ADMIN] Need help in enabling remote connection

2009-11-03 Thread Scott Marlowe
On Tue, Nov 3, 2009 at 11:26 AM, Kevin Grittner wrote: > Scott Marlowe wrote: > >>> -- Dear Ian Lea, i guess 10.0.0.1/24  is the same as 10.0.0.0/24 >>> as the mask '24' means that the first 3 octets (24 bits from the >>> left hand side) must match ie both mean simply 10.0.0.* >> >> Actually 10.0

Re: [ADMIN] Need help in enabling remote connection

2009-11-03 Thread Shruthi A
Hi all, Thanks a lot for all your replies. The problem is solved now. This is the correct thing to do:listen_addresses = '*' And then restart the service. Additional notes: -- Remember to use single quotes around the * else it will give syntax error. -- The listen_addresses parameter specif

Re: [ADMIN] Need help in enabling remote connection

2009-11-02 Thread Sam Jas
ruthi A Subject: [ADMIN] Need help in enabling remote connection To: [email protected] Date: Monday, 2 November, 2009, 1:26 PM Hi, I want a postgres client to be able to connect to a postgres sever on a remote machine.  But i'm not able to make it work.  Assume both the machines

Re: [ADMIN] Need help in enabling remote connection

2009-11-02 Thread Brian Modra
2009/11/2 Shruthi A : > Hi, > > I want a postgres client to be able to connect to a postgres sever on a > remote machine.  But i'm not able to make it work.  Assume both the machines > are on a LAN 10.0.0.* .Following available advice, this is what i did: > > -- In pg_hba.conf, i added the line > h

Re: [ADMIN] Need help in enabling remote connection

2009-11-02 Thread Julius Tuskenis
Hello, I think you make mistake writing "listen_addresses = 10.0.0.*". I doubt it can be done like this... Try "listen_addresses = '*'" first. Also see, that addresses are in form '10.0.0.1' and not 10.0.0.1. (use ' ) If this doesn't help try telneting server (port 5432) from client mashine. M

[ADMIN] Need help in enabling remote connection

2009-11-02 Thread Shruthi A
Hi, I want a postgres client to be able to connect to a postgres sever on a remote machine. But i'm not able to make it work. Assume both the machines are on a LAN 10.0.0.* .Following available advice, this is what i did: -- In pg_hba.conf, i added the line host all all 10.0.0.1/24 trust --

Re: R: [ADMIN] Need help to restore database

2009-03-17 Thread Ray Stell
On Tue, Mar 17, 2009 at 03:27:42PM +0100, Lori, Giancarlo wrote: > Thanks to all, I have solved, I have been able to restart the Postgres db, > and then after a pg-dump I have created a new one. > Thanks again I'd like to learn from your experience. Perhaps you would be willing to expand on the

R: [ADMIN] Need help to restore database

2009-03-17 Thread Lori, Giancarlo
@postgresql.org Oggetto: Re: [ADMIN] Need help to restore database On Tue, 2009-03-17 at 09:50 +0100, Lori, Giancarlo wrote: > we are facing with a struggle problem with PostgreSql database > production. > > A client system based on pgsql is down because the database raise an > error me

Re: [ADMIN] Need help to restore database

2009-03-17 Thread Simon Riggs
On Tue, 2009-03-17 at 09:50 +0100, Lori, Giancarlo wrote: > we are facing with a struggle problem with PostgreSql database > production. > > A client system based on pgsql is down because the database raise an > error message like “ no left space on device”. We have deleted some > log files on

Re: [ADMIN] Need help to restore database

2009-03-17 Thread Ray Stell
On Tue, Mar 17, 2009 at 12:01:01PM +0100, [email protected] wrote: > On Tue, 17 Mar 2009 09:50:55 +0100, "Lori, Giancarlo" > wrote: > > the postmaster process run, but any command pg_dump, etc I try to > > execute failed. The system respond that there are not database in the > > system.

Re: [ADMIN] Need help to restore database

2009-03-17 Thread Alvaro Herrera
Lori, Giancarlo wrote: > A client system based on pgsql is down because the database raise an > error message like " no left space on device". We have deleted some log > files on this machine and after a system restart the db (and the system) > was up&running. After two days the database has crash

Re: [ADMIN] Need help to restore database

2009-03-17 Thread adamr
On Tue, 17 Mar 2009 09:50:55 +0100, "Lori, Giancarlo" wrote: > Hi all, > we are facing with a struggle problem with PostgreSql database > production. > A client system based on pgsql is down because the database raise an > error message like " no left space on device". We have deleted some log >

[ADMIN] Need help to restore database

2009-03-17 Thread Lori, Giancarlo
Hi all, we are facing with a struggle problem with PostgreSql database production. A client system based on pgsql is down because the database raise an error message like " no left space on device". We have deleted some log files on this machine and after a system restart the db (and the system) w

Re: [ADMIN] Need help. Postgres log for prepared statements.

2007-01-08 Thread Tom Lane
"Alagarsamy Manimaran-FDRP63" <[EMAIL PROTECTED]> writes: > I am running Postgres 8.0. How can I get the parameter values printed in > the log for a prepared statement? Update to 8.2. regards, tom lane ---(end of broadcast)-

[ADMIN] Need help. Postgres log for prepared statements.

2007-01-07 Thread Alagarsamy Manimaran-FDRP63
I am running Postgres 8.0. How can I get the parameter values printed in the log for a prepared statement? I am seeing the parameter values shown as $1 $2 etc. Thanks Mani

[ADMIN] Need Help with Logfile Entry

2006-07-06 Thread Moritz Bayer
Hello List,I've installed postgres 8.1 and using a cluster which holds a database db_mail. It suppose to work with postfix and sasl-auth, but for some reason it doesn't work.I think Sasl-auth is trying to connect to the db, the logfile shows the following entry after a postfix-sasl-auth connection

Re: [ADMIN] Need help in installing postgresql 8.1.2 on Windows

2006-01-20 Thread John DeSoi
On Jan 18, 2006, at 12:30 AM, Sarvjot Kaur wrote: I am trying to install Globus Toolkit4 on Windows machine. Postgresql8.1.2 is required software for installing GT4. But i cant get installation steps from anywhere.. http://www.postgresql.org/ftp/binary/v8.1.2/win32/ Information at the b

[ADMIN] Need help in installing postgresql 8.1.2 on Windows

2006-01-19 Thread Sarvjot Kaur
Sir I am trying to install Globus Toolkit4 on Windows machine. Postgresql8.1.2 is required software for installing GT4. But i cant get installation steps from anywhere.. Please help me and do reply Thanks Sarvjot Yahoo! Photos Got holiday prints? See all the ways to get quality prints in y

[ADMIN] Need HELP - URGENT

2005-10-19 Thread Gourish Singbal
Tom,   Need some help in analyzing the pg_controldata output.   pg_control version number:    72Catalog version number:   200310211Database cluster state:   in productionpg_control last modified: Wed 19 Oct 2005 02:40:53 AM PDT Current log file ID:   

Re: [ADMIN] Need help with corrupt pg_statistic

2005-10-03 Thread Jim C. Nasby
You should probably be asking yourself why you have corruption in your database. I suspect whatever hardware that database is on is having problems that need to be addressed. On Thu, Sep 29, 2005 at 05:42:16PM -0700, Kevin Seghetti wrote: > I am using postgres 7.4.5, and have a corrupt pg_statisti

Re: [ADMIN] Need help with corrupt pg_statistic

2005-10-02 Thread Tom Lane
Kevin Seghetti <[EMAIL PROTECTED]> writes: > Is there any way to nuke pg_statistic (since its contents can be > recalculated anyway?) You want to do "TRUNCATE pg_statistic"; to avoid the permission check, you'll need to do that in a standalone backend with -O option. Do *not* try to drop and recr

[ADMIN] Need help with corrupt pg_statistic

2005-10-02 Thread Kevin Seghetti
I am using postgres 7.4.5, and have a corrupt pg_statistic. Many commands cause the following error: ERROR: invalid page header in block 10 of relation "pg_statistic" I want to preserve my data if at all possible, I figured I would just dump the database and reload it. I tried pg_dump, but it giv

[ADMIN] Need Help

2005-08-26 Thread Gourish Singbal
Hi all, I was going through pg_resetxlog manual page. and found the following line confusing. "For example, if 00FF003A is the largest entry in pg_xlog, -l 0xFF,0x3B will work. " with respect to calculating the -l value for pg_resetxlog . please could someone explain this calculation in s

Re: [ADMIN] Need help in data migration

2005-05-06 Thread Joel Fradkin
eply email and delete and destroy all copies of the original message, including attachments. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Long Sent: Friday, May 06, 2005 12:34 PM To: pgsql-admin Subject: Re: [ADMIN] Need help in data migra

Re: [ADMIN] Need help in data migration

2005-05-06 Thread Michael Long
> If you are interested give me a call or we can go back and forth here. > Please do it here as I may have a similar situation with SQL Server soon and would like to learn from your experience. Thanks, mike ---(end of broadcast)--- TIP 6: Have you

Re: [ADMIN] Need help in data migration

2005-05-05 Thread David A. Leedom
Gourish I have worked on a similar project If you are interested give me a call or we can go back and forth here. Enthusiastically, Dave Leedom At 08:22 AM 5/5/2005, Gourish Singbal wrote: I need help to transfer data  from postgreql to oracle database on regular basis. The original productin ap

[ADMIN] Need help in data migration

2005-05-05 Thread Gourish Singbal
I need help to transfer data from postgreql to oracle database on regular basis. The original productin application runs on oracle. We need this setup temporarily for certain time period till we are confortable that our application can survive on postgresql. Please help if somebody has worked on

Re: [ADMIN] Need Help with reindexing

2005-03-13 Thread Tom Lane
Gourish Singbal <[EMAIL PROTECTED]> writes: > I need some help to decide when i should reindex the indexes in the table. > ... > When should i ideally reindex this table ?. > (once in a month, weeklyetc) It seems to need reindexing now, but that tells us nothing about how often you might need

[ADMIN] Need Help with reindexing

2005-03-13 Thread Gourish Singbal
Guys, I need some help to decide when i should reindex the indexes in the table. Postgresql 7.4.5 and linux O.S. Below is the results of vacuum analyze verbose on the table INFO: vacuuming "public.rpt_metrics" INFO: index "rpt_metrics_date_network_advertiser" now contains 102960776 row versions

Re: [ADMIN] Need Help in Taking Backups

2004-12-07 Thread Gourish Singbal
Thanks, i think Slony-I might be an answer to my questions. But need to explore Slony-I before saying anything. Has Anybody found any dificulties in implementing hotback, using Slony-I. Thoughts would be of great help. regards Gourish. On 7 Dec 2004 04:17:21 GMT, Christopher Browne <[EMAIL PROTE

Re: [ADMIN] Need Help in Taking Backups

2004-12-06 Thread Christopher Browne
Well, you can take a pg_dump to get the state of the system at a point in time. That's very easy. But you really need to specify your 'disaster modelling' and recovery requirements in _much_ greater detail. It may be that in order to keep recovery time down, you'll need to use a replication syst

Re: [ADMIN] Need Help in Taking Backups

2004-12-06 Thread Christopher Browne
In the last exciting episode, [EMAIL PROTECTED] (Gourish Singbal) wrote: > Whats the Best plan to take Backups for Postgres 7.4.5 database > considering the database is 24/7 and transaction based. Well, you can take a pg_dump to get the state of the system at a point in time. That's very easy, al

[ADMIN] Need Help in Taking Backups

2004-12-06 Thread Gourish Singbal
Whats the Best plan to take Backups for Postgres 7.4.5 database considering the database is 24/7 and transaction based. -- Best, Gourish Singbal ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.po

Re: [ADMIN] Need help

2004-10-20 Thread Chris White (cjwhite)
: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [ADMIN] Need help On Wed, 2004-10-20 at 12:57, Chris White (cjwhite) wrote: > I am running 7.4.2 and I am seeing a strange error. I am using jdbc to > update a table with the following statement: > > update vm_message set usec

Re: [ADMIN] Need help

2004-10-20 Thread Scott Marlowe
On Wed, 2004-10-20 at 12:57, Chris White (cjwhite) wrote: > I am running 7.4.2 and I am seeing a strange error. I am using jdbc to > update a table with the following statement: > > update vm_message set usecount=4 where messsage id='1234567'; Is that really your query, cut and pasted? Is that

Re: [ADMIN] Need help

2004-10-20 Thread Joshua D. Drake
EMAIL PROTECTED] Sent: Wednesday, October 20, 2004 12:42 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [ADMIN] Need help ERROR: duplicate key violates unique constraint "vm_message_pkey" I don't understand why I am getting this message because the primary key for table vm_

Re: [ADMIN] Need help

2004-10-20 Thread Chris White (cjwhite)
EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [ADMIN] Need help > ERROR: duplicate key violates unique constraint "vm_message_pkey" > > I don't understand why I am getting this message because the primary > key for table vm_message is messageid and this is not being

Re: [ADMIN] Need help

2004-10-20 Thread Joshua D. Drake
ERROR: duplicate key violates unique constraint "vm_message_pkey" I don't understand why I am getting this message because the primary key for table vm_message is messageid and this is not being changed Any body have any ideas? 7.4.2 is know to have index issues. Try reindexing the primary key

[ADMIN] Need help

2004-10-20 Thread Chris White (cjwhite)
I am running 7.4.2 and I am seeing a strange error. I am using jdbc to update a table with the following statement:   update vm_message set usecount=4 where messsage id='1234567';   this statements generates a PSQLException with the following message:   ERROR: duplicate key violates unique

Re: [ADMIN] Need Help on query tuning

2003-08-20 Thread Mendola Gaetano
""Somasekhar Bangalore"" <[EMAIL PROTECTED]> wrote: >Hi, >I am having 7.2.3 version of postgres database. I have huge data in my database. I have a couple of views and >functions used in the application.if i run the views. The views take a long time to get the data. I am joining just 4 >tables nam

[ADMIN] Need Help on query tuning

2003-08-20 Thread Somasekhar Bangalore
Hi,   I am having 7.2.3 version of postgres database. I have huge data in my database. I have a couple of views and functions used in the application.if i run the views. The views take a long time to get the data. I am joining just 4 tables namely roles,link_roles ,link_rights ,rights.   Rec

[ADMIN] Need help/suggestions with backup/restore of database tables.

2003-06-24 Thread Chris White (cjwhite)
I have four tables in a database which reference all the large objects in the database. I need to backup and restore these 4 tables and the large objects independently of the other tables in the database. pg_dump only allows me to dump the whole database, if I want to dump the large objects. I kno

[ADMIN] Need help with this trouble.

2003-06-08 Thread Rafael Mauricio González Palacios
Hello. We had a very serious trouble last week with our databases in Postgres and we wanna know if maybe someone can help us to find the problem. The trouble was that a day some databases in Postgres appear without any row of information; some other, doesn't led us describe the tables (\d),

Re: [ADMIN] Need Help on Japanese language

2002-11-25 Thread Ian Barwick
On Monday 25 November 2002 10:48, Somasekhar wrote: (B> Hi, (B> (B> I have a postgres database running on a english linux box.what settings (B> need to be done , so that i can insert japanese characters into the (B> database. (B (BInsertion of Japanese text should work regardless of however

[ADMIN] Need Help on Japanese language

2002-11-25 Thread Somasekhar
Hi, I have a postgres database running on a english linux box.what settings need to be done , so that i can insert japanese characters into the database. thanks in advance. Somasekhar Bangalore Principal Software Engineer ZenSutra Software Technologies Pvt. Ltd. Suite 601, HM Geneva House #14, C

[ADMIN] Need help

2002-01-03 Thread Shamik Majumder
Hi , We are facing some problems with the creation of tables of same name but owned by different user . We followed the following steps . Lets say, we have a database DBTest and this database was created by the user postgres. We created tables - Table1, Table2 and Table3 in it. Now, by using t

Re: [ADMIN] Need help or advices : databases and tables invisibles and not accessibles !

2001-09-06 Thread Tom Lane
Richard NAGY <[EMAIL PROTECTED]> writes: > Recently, we have found that our databases (all of them) and their > tables are not visible and not accessible > We are using the version 7.0.2 of postgresql on a Linux Red Hat 6.2. > What is the binary file pg_log ? It's very huge ! Is it exactly 1

[ADMIN] Need help

2001-05-22 Thread Hitesh Shah
Dear Sir, I am working in private limited company in Ahmedabad,Gujarat,India.In a company we have a network of linux operating system & generally development is on Java web and application side.We are using postgresql as a backend in our esteemed organisation,but we could not able to make

Re: [ADMIN] Need Help in creating script

2001-05-17 Thread Oliver Elphick
"Prashant Sinha" wrote: >I am a new postgre user. I had used sql commands to create database and tab= >les. Is it possible to create a script or installable version on existing d= >atabase which I could run on any machine and it would crearte the database = >with all the tables and everyth

[ADMIN] Need Help in creating script

2001-05-16 Thread Prashant Sinha
Hi, I am a new postgre user. I had used sql commands to create database and tables. Is it possible to create a script or installable version on existing database which I could run on any machine and it would crearte the database with all the tables and everything. Can anyone please help me w

Re: [ADMIN] Need help ! --backend closed the channel unexpectedly

2000-08-21 Thread Stephan Szabo
Is there anything in the logs from the postmaster or the postgres backend? On Mon, 21 Aug 2000, poowasun wrote: > Sorry for my bad English also I am newbie in Postgres. > > I have running PostgreSQL 7.0.2 on RedHat 6.0 for 2 months without problem. Just >today when I > tried to connect, I re

[ADMIN] Need help ! --backend closed the channel unexpectedly

2000-08-21 Thread poowasun
Sorry for my bad English also I am newbie in Postgres. I have running PostgreSQL 7.0.2 on RedHat 6.0 for 2 months without problem. Just today when I tried to connect, I recevied following error messages: == [poo@data poo]$ psql pioneer psql: pqReadData() -- backend closed th

[ADMIN] Need help with pg_hba.conf, CREATE USER and password authentication

1999-01-27 Thread Olsen, James
Hello all, I'm using PostGre 6.3 on a Linux box and connecting to it via ODBC from Win98. My pg_shadow table has the following record (example): usename |usesysid|usecreatedb|usetrace|usesuper|usecatupd|passwd|valuntil ++---+++-+--