[SQL] Get max value from an comma separated string

2006-06-03 Thread Mauro Bertoli
Hi, I've a field that contain values-comma-separated like A) 1;2;3;;5 -- ;2;;4;5 but also B) 12;34;18 how I can get the max value? For A I tried: SELECT max(array_upper(string_to_array(answer,';'),1)) FROM values; and work fine, but for B case I don't find a solution like SELECT max(string_to_arra

Re: [SQL] PHP postgres connections

2005-05-06 Thread Mauro Bertoli
Hi, Thank for your answers. I asked here because I had thought the problem was in how Postgres manage connections. Sorry --- Yasir Malik <[EMAIL PROTECTED]> ha scritto: > > Hi, > > I need to connect to 2 differents Postgres 8.0.0 > > databases located in the same machine using the > same > > PHP sc

[SQL] PHP postgres connections

2005-04-29 Thread Mauro Bertoli
ever persistent connections ? Thanks, Mauro B. ___ Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam, Giochi, Rubrica… Scaricalo ora! http://it.messenger.yahoo.it ---(end of broadcast)-

[SQL] Postgres 8.0.0 - unknown log string

2005-04-29 Thread Mauro Bertoli
Hi, I found in my postges 8.0 logs (/var/lib/pgsql/data/pg_log/postgresql-Thu.log) LOG: incomplete startup packet LOG: incomplete startup packet very very times. What's it? I did't found answers in the postgres documentation. Can someone explain me about it? Thank

[SQL] php wrapper

2005-04-22 Thread Mauro Bertoli
Hi, I need a PHP wrapper for PostgreSQL... I found 1000 small "+/- identicals" wrappers but incompleted There's an "ufficial" or an suggested PHP wrapper? ___ Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam, Giochi, Ru

Re: [SQL] Query history file

2005-04-10 Thread Mauro Bertoli
> From the > server side, if you enable 'log_statement' all > queries will go into the > server logs. Thank you, I enabled log_statement = all log_duration = true It's beautiful! :) ___ Nuovo Yahoo! Messenger: E' molto più divertente: Audibles,

[SQL] Query history file

2005-04-02 Thread Mauro Bertoli
Hi, I've installed a Postgres 8.0. There's a history file with all executed queries? Thanks! ___ Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam, Giochi, Rubrica… Scaricalo ora! http://it.messenger.yahoo.it

Re: [SQL] Postgres performance

2005-03-07 Thread Mauro Bertoli
between > insertion of parent > and child row. Although in this case FK's is not the > solution, > transactions are. I insert a tuple (in the table answers) if the key 'iduser->idquestion' don't exists but when the key exists I update the value; this is coded in php b

Re: [SQL] Postgres performance

2005-03-07 Thread Mauro Bertoli
ns may be rapidly swamped. Check your database documentation for information on handling abandoned or idle connections." What about it? (i think it's the same with mySQL...) I don't know how users can connect to... 1, 10, 1000... I m

Re: [SQL] Postgres performance

2005-03-07 Thread Mauro Bertoli
ks like vacuum to me, and sometimes repair > table... Ok... they are conceptually implemented in the same mode... Thx a lot! Now my ideas about pg & mySQL are cleared (and corrects ;) ) Mauro ___ Nuovo Yahoo! Messenger: E' molto più divert

Re: [SQL] Postgres performance

2005-03-04 Thread Mauro Bertoli
Hi Richard, thank you for your apreciated answers!!! - start quote - Well, do you care whether your data is consistent or not? If not, you don't need transactions. - end quote - I don't require transaction because the query aren't complex and update a single tuple (in SELECT transactions are us

Re: [SQL] Postgres performance

2005-03-04 Thread Mauro Bertoli
figure hardware dependent Postgres internal values? Thx, best regards,Mauro ___ Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam, Giochi, Rubrica… Scaricalo ora! http://it.messenger.yahoo.it --

Re: [SQL] Postgres performance

2005-03-01 Thread mauro
> Not always, AFAICT. The four most common reasons why PG tests slower > than Mysql are: > 1. You haven't configured or have misconfigured PostgreSQL. > 2. You are testing a MySQL-tuned application (lots of small, simple > queries, no views, no subselects etc) > 3. You are only testing one connec

Re: [SQL] Postgres 8 - problem: invalid input syntax for integer

2005-02-28 Thread mauro
7;') becomes 0 (ok, no comment :) ) logically wrong but practically perfect! [...CAST CODE...] Thank you for the explicit-cast code, but I want reproduce it in 'database level' so I don't use explicit cast but IMPLICIT; everytime updating integer fields with '' values it ca

[SQL] Postgres 8 - problem: invalid input syntax for integer

2005-02-23 Thread mauro
tion query - I don't know what's field type) Now in postgres 8 this don't work. Why ?(ok, it's the ufficial documentation but I don't understand... why? it's so comfortable!) Can someone help me to create a CAST to re-use this feature? Thank you! M

[SQL] Postgres performance

2005-02-23 Thread mauro
Hi, I understand this is an super-older thread!! note: i like postgres and not mysql! I'm a Postgres server user: I've postgres 7.2 and 8.0 in many servers and I've tested performance Postgres vs MySQL and I see Postgres is very slow. But my question is: why? Cannot Postgres team make faster becau