[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
Hi, I need to connect to 2 differents Postgres 8.0.0 databases located in the same machine using the same PHP script with an "db wrapper object" instance (pg_Connect)... simply a PHP page with contemporarily 2 database connections... What's the best practice ? Can I use however persistent connec

[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? Thanks, Mauro B. _

[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
> > Yes, you are rigth... my insert/update are very > simple > > and without problems and so I think to use > 'foreign > > key' coded to make faster/simpler the management > and > > don't overloading the db (and use exception code > > management )... but I had a problem with pgSQL > because > > ser

Re: [SQL] Postgres performance

2005-03-07 Thread Mauro Bertoli
> > No, I haven't foreign keys in the older version, > in > > that new I've it... however I manage relations > from > > app code (PHP)... > > Really ? > In my experience this is a sure way to get > inconsistencies slowly > creeping into your database, and you also get a load > of fun

Re: [SQL] Postgres performance

2005-03-07 Thread Mauro Bertoli
--- PFC <[EMAIL PROTECTED]> wrote: > You mean, you have no foreign keys in your database ? > In SELECT they are definitely useful (think select > for update, isolation > level serializable...) No, I haven't foreign keys in the older version, in that new I've it... however I manage re

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
Hi, thanks a lot! you are rigth, but I did read your message ;) Yes, 1- I misconfigured PostgreSQL (I thought that was already configured in base to the released version - Fedora Core 3 64bit). 2- The bench is, clearly after your precisations, an MySQL tuned application tests. 3- I think the bench