Re: [GENERAL] Broken pipe
Hi all, I am not expert in PHP, so my assumption may not correct Can we solve this problem by increasing the "max_execution_time" value at php.ini file? --Nirmalya --- Ben-Nes Yonatan <[EMAIL PROTECTED]> wrote: > Hi all, > > I sent the following email to the php mailing list also but maybe > this > is a more appropriate mailing list. > > I wrote a php script which is running very long queries (hours) on > a > database. > I seem to have a problem to run the code when there are single > queries > which take long times (like 5 hours for an update query), from the > log > of the database I received the following code: > > 2005-09-30 17:12:13 IDT postgres : LOG: 0: duration: > 18730038.678 > ms statement: UPDATE product_temp SET nleft=(SELECT > 2005-09-30 17:12:13 IDT postgres : LOCATION: exec_simple_query, > postgres.c:1035 > 2005-09-30 17:12:13 IDT postgres : LOG: 08006: could not send data > to > client: Broken pipe > 2005-09-30 17:12:13 IDT postgres : LOCATION: internal_flush, > pqcomm.c:1050 > 2005-09-30 17:12:13 IDT postgres : LOG: 08P01: unexpected EOF on > client > connection > 2005-09-30 17:12:13 IDT postgres : LOCATION: SocketBackend, > postgres.c:287 > 2005-09-30 17:12:13 IDT postgres : LOG: 0: disconnection: > session > time: 6:04:58.52 > 2005-09-30 17:12:13 IDT postgres : LOCATION: log_disconnections, > postgres.c:3403 > > Now after the 5 hours update it need to echo into a log file a line > which say that it ended this command (just for me to know the > times), my > assumption is that PHP read the code into memory at start and > opened the > connection to the file, after a time which he waited to any given > "life > sign" he gave up and closed the connection to the file, and when > the > code came back to the file it encountered no connection to the file > (broken pipe). > > Am I correct at my assumption? if so how can I set the PHP to wait > how > much I tell him? > Ofcourse if im wrong I would like to know the reason also :) > > > Thanks in advance, > Ben-Nes Yonatan > > > ---(end of > broadcast)--- > TIP 5: don't forget to increase your free space map settings > __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [GENERAL] Broken pipe
OK..change another thing and try again. 1> Increase "Timeout" value in the file "/etc/httpd/conf/httpd.conf". 2> Restart http server by "/sbin/service httpd restart" command. 3> Now run your PHP script again. I think the problem is not in PostgreSQL, the problem is somewhere in PHP or http server. OK..lets try the process written above. I am waiting for your reply. --Nirmalya --- Ben-Nes Yonatan <[EMAIL PROTECTED]> wrote: > - Original Message - > From: "Nirmalya Lahiri" <[EMAIL PROTECTED]> > To: > Sent: Sunday, October 02, 2005 7:34 PM > Subject: Re: [GENERAL] Broken pipe > > > Hi all, > I am not expert in PHP, so my assumption may not correct > Can we solve this problem by increasing the "max_execution_time" > value at php.ini file? > > --Nirmalya > > > --- Ben-Nes Yonatan <[EMAIL PROTECTED]> wrote: > > > Hi all, > > > > I sent the following email to the php mailing list also but maybe > > this > > is a more appropriate mailing list. > > > > I wrote a php script which is running very long queries (hours) > on > > a > > database. > > I seem to have a problem to run the code when there are single > > queries > > which take long times (like 5 hours for an update query), from > the > > log > > of the database I received the following code: > > > > 2005-09-30 17:12:13 IDT postgres : LOG: 0: duration: > > 18730038.678 > > ms statement: UPDATE product_temp SET nleft=(SELECT > > 2005-09-30 17:12:13 IDT postgres : LOCATION: exec_simple_query, > > postgres.c:1035 > > 2005-09-30 17:12:13 IDT postgres : LOG: 08006: could not send > data > > to > > client: Broken pipe > > 2005-09-30 17:12:13 IDT postgres : LOCATION: internal_flush, > > pqcomm.c:1050 > > 2005-09-30 17:12:13 IDT postgres : LOG: 08P01: unexpected EOF on > > client > > connection > > 2005-09-30 17:12:13 IDT postgres : LOCATION: SocketBackend, > > postgres.c:287 > > 2005-09-30 17:12:13 IDT postgres : LOG: 0: disconnection: > > session > > time: 6:04:58.52 > > 2005-09-30 17:12:13 IDT postgres : LOCATION: log_disconnections, > > postgres.c:3403 > > > > Now after the 5 hours update it need to echo into a log file a > line > > which say that it ended this command (just for me to know the > > times), my > > assumption is that PHP read the code into memory at start and > > opened the > > connection to the file, after a time which he waited to any given > > "life > > sign" he gave up and closed the connection to the file, and when > > the > > code came back to the file it encountered no connection to the > file > > (broken pipe). > > > > Am I correct at my assumption? if so how can I set the PHP to > wait > > how > > much I tell him? > > Ofcourse if im wrong I would like to know the reason also :) > > > > > > Thanks in advance, > > Ben-Nes Yonatan > > > > > > ---(end of > > broadcast)--- > > TIP 5: don't forget to increase your free space map settings > > > > Well I set the max_execution_time to 0 which is supposed to be > endlessly, > but I think that after sometime even that get closed. > I really dont know if its a postgresql problem or php > > Shana Tova! (hebrew happy new year :)) > Ben-Nes Yonatan > > > > __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
[GENERAL] Information regarding currently locked tables
Hi all, I want a list of currently locked tables. How can I do that? I already found a list from pg_locks table. But how I know the name of the table against relation id of a relation? Nirmalya Lahiri(+91-94331-13536) Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.
[GENERAL] Private or publice function
Hi, How can I create a publice or private function? Nirmalya Lahiri __ Do you Yahoo!? Yahoo! Mail - 250MB free storage. Do more. Manage less. http://info.mail.yahoo.com/mail_250 ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [GENERAL] Private or publice function
Thanks Richard, for your reply. Now I am explaining you what I want. Let I have 4 functions..function_1(),function_2(),function_3(),function_4(). create or replace function function_1() returns numeric as ' begin create or replace function function_2() returns numeric as '' begin end; '' language plpgsql --- --- --- create or replace function function_3() returns numeric as '' begin - - end; '' language plpgsql end ; ' language plpgsql create or replace function function_4() returns numeric as ' begin --- --- end; ' language plpgsql Now after creating these functions, I can easily call every function from psql prompt. But I want to encapsulate function_2() and function_3() withen function_1(), so that no one can call function_2() and function_3() from psql prompt and from function_4(), only from withen the function_1() I can call function_2() and function_3(). Is it possible in PostgreSQL? Nirmalya Lahiri --- Richard Huxton wrote: > Nirmalya Lahiri wrote: > > Hi, > > How can I create a publice or private function? > > I'm not sure the concept makes sense in PostgreSQL. Can you explain > what > you're trying to achieve? > > -- >Richard Huxton >Archonet Ltd > > ---(end of > broadcast)--- > TIP 2: you can get off all lists at once with the unregister > command > (send "unregister YourEmailAddressHere" to > [EMAIL PROTECTED]) > __ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [GENERAL] encryption/decryption
Hi Akhilesh, Can you send the script please I want to see that. --Nirmalya --- AKHILESH GUPTA <[EMAIL PROTECTED]> wrote: > hi all, > just to ask u all one thing regarding encryption/decryption. > > i am migrating my database from mysql to pgSQL using a php script. > in mysql there is a table 'users' where a field 'password' is there > of type > varchar(30), > and is encrypted using AES algorithm, and when i check all the > records in > mysql it looks like:- > > mysql> select * from USERS; > ++--+--+---++---+ > | id | name | password | password_modified | created_on > | admin > | > ++--+--+---++---+ > | 1 | Admin| \u\u\u6fde\u\u > \u/|\u9A | Y | > 2005-08-10 | > Y | > | 2 | sangeeta | > \u\uX\u\u\u0215\u0635\ukg\ug\u > | Y | 2005-08-13 | Y | > | 3 | check1 | > [EMAIL PROTECTED] > | > Y | 2005-08-10 | Y | > | 4 | check2 | | Y | 2005-08-10 > | N > | > | 5 | check3 | > V[6\u\u\uw\u\u\u\u.C'\u | > Y | 2005-08-10 | N | > | 16 | user | > 5\u\u\u\u<\u.\u\u\u\u^k | > Y | 2005-08-10 | N | > | 6 | admin| > \u77\u\u\us\u\u3h\uM\u%\u | > Y | 2005-08-10 | Y | > | 17 | anita| > \u\u\u\u\u\uH\u"\uhe)U\u | > Y | 2005-09-27 | Y | > | 1 | Akhilesh | cheeks | y | 2006-04-01 > | y > | > ++--+--+---++---+ > 9 rows in set (0.00 sec) > > (all these "ufff\ufff\ufff<\ufff\U\ufff" the password field is > seems as > special characters like triangles and rectangles, u can say like > chinese > characters) > > now, when i am running my script, then only one record, where > name='check2' > is copied (because no password is there in this case), but not any > other > record is displayed. > > plz help me in this case and do tell what should i do to copy all > the > records... > (any suggestion either at the php/mysql/postgresql level) > do help me..plz..! > -- > Thanks & Regards, > Akhilesh > DAV Institute of Management > Faridabad(Haryana) > GSM:-(+919891606064) > (+911744293789) > > "FAILURES CAN BE FORGIVEN BUT AIMING LOW IS A CRIME" > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
Re: [GENERAL] Update from diferents conditions
I think it is not possible using a single SQL command. You have to issue separate SQL command for each row. --- Claudio Alejandro Ulloa Heinsohn <[EMAIL PROTECTED]> wrote: > i want update differents rows of a table, but each row with a > diferente > condition, is possible make that update? > > > > ---(end of > broadcast)--- > TIP 9: In versions below 8.0, the planner will ignore your desire > to >choose an index scan if your joining column's datatypes do > not >match > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [GENERAL] Comparing text field
You have made a wrong mistake in your SQL quary. Your quary should be look like this. SELECT id FROM table1 WHERE message like '%VAC153-683-685-131830- /O.NEW.KLWX.SV.W.0022.060413T1742Z-060413T1830Z/ BULLETIN - EAS ACTIVATION REQUESTED SEVERE THUNDERSTORM WARNING NATIONAL WEATHER SERVICE BALTIMORE MD/WASHINGTON DC 142 PM EDT THU APR 13 2006 THE NATIONAL WEATHER SERVICE IN STERLING VIRGINIA HAS ISSUED A * SEVERE THUNDERSTORM WARNING'; --- Nik <[EMAIL PROTECTED]> wrote: > I am trying to compare a large string (that has new line characters > in > it) to the contents of the text field (which also has new line > characters in it) and it is not behaving as expected. > > For example I have the following record in the database: > id=83 > message=VAC153-683-685-131830- > /O.NEW.KLWX.SV.W.0022.060413T1742Z-060413T1830Z/ > BULLETIN - EAS ACTIVATION REQUESTED > SEVERE THUNDERSTORM WARNING > NATIONAL WEATHER SERVICE BALTIMORE MD/WASHINGTON DC > 142 PM EDT THU APR 13 2006 > THE NATIONAL WEATHER SERVICE IN STERLING VIRGINIA HAS ISSUED A > * SEVERE THUNDERSTORM WARNING > > If I do the following query > SELECT id FROM table1 WHERE message='VAC153-683-685-131830- > /O.NEW.KLWX.SV.W.0022.060413T1742Z-060413T1830Z/ > BULLETIN - EAS ACTIVATION REQUESTED > SEVERE THUNDERSTORM WARNING > NATIONAL WEATHER SERVICE BALTIMORE MD/WASHINGTON DC > 142 PM EDT THU APR 13 2006 > THE NATIONAL WEATHER SERVICE IN STERLING VIRGINIA HAS ISSUED A > * SEVERE THUNDERSTORM WARNING' > > I get no results back, even though the message is equivalent. How > should I perform this comparison so that the above query returns > id=83? > > Thanks. > > > ---(end of > broadcast)--- > TIP 3: Have you checked our extensive FAQ? > >http://www.postgresql.org/docs/faq > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match