[GENERAL] Debian, backport and tsearch

2008-10-16 Thread Ivan Sergio Borgonovo
etch 8.1 to backport 8.3? [1] that doesn't mean as soon as lenny will be stable, but as soon I'll be able to handle it. thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

further tests with 8.3 was: Re: [GENERAL] Drupal and PostgreSQL - performance issues?

2008-10-16 Thread Ivan Sergio Borgonovo
On Tue, 14 Oct 2008 18:44:56 +0200 Ivan Sergio Borgonovo [EMAIL PROTECTED] wrote: BTW I hope someone may find good use of this: 2xXeon HT CPU 3.20GHz (not dual core), 4Gb RAM, RAID 5 SCSI * absolutely not tuned Apache * absolutely not tuned Drupal with little content, some blocks and some

[GENERAL] ssl woes after 8.1 - 8.3 update

2008-10-16 Thread Ivan Sergio Borgonovo
: No such file or directory is there an howto to do things properly in spite of just trial and errors? I wouldn't like to come out with an absolutely insecure solution after sweating ;) snakeoil is not a very good premise. thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via

Re: [GENERAL] ssl woes after 8.1 - 8.3 update

2008-10-16 Thread Ivan Sergio Borgonovo
. What's actually going to happen if I kill root.crt? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Drupal and PostgreSQL - performance issues?

2008-10-14 Thread Ivan Sergio Borgonovo
PostgreSQL performances. I'm happy with PostgreSQL, it does what I think is important for me better than MySQL... and I'm using it on Drupal in nearly all the websites I developed. On Mon, Oct 13, 2008 at 1:02 AM, Ivan Sergio Borgonovo [EMAIL PROTECTED] wrote: snip Anyway I don't find myself

Re: [GENERAL] Drupal and PostgreSQL - performance issues?

2008-10-14 Thread Ivan Sergio Borgonovo
: 0.00 -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] PL/pgSQL stored procedure returning multiple result sets (SELECTs)?

2008-10-14 Thread Ivan Sergio Borgonovo
. PostgreSQL is easier to program and its programming infrastructure is MUCH MUCH more mature. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Drupal and PostgreSQL - performance issues?

2008-10-14 Thread Ivan Sergio Borgonovo
On Tue, 14 Oct 2008 06:42:33 -0700 Joshua D. Drake [EMAIL PROTECTED] wrote: Mikkel Høgh wrote: On 14/10/2008, at 11.40, Ivan Sergio Borgonovo wrote: That might be true, if the only demographic you are looking for are professional DBAs, but if you're looking to attract more developers

benchmark on D7 + PG 8.3 Re: [GENERAL] Drupal and PostgreSQL - performance issues?

2008-10-14 Thread Ivan Sergio Borgonovo
update or PG 8.3 update. If I've to chse I'd say the improvement comes from drupal new caching system. I'll try to find some spare time and do some more extensive benchmark. It would be interesting to see which are the slowest queries. -- Ivan Sergio Borgonovo http://www.webthatworks.it

Re: [GENERAL] Drupal and PostgreSQL - performance issues?

2008-10-13 Thread Ivan Sergio Borgonovo
to be done on the PostgreSQL code. If there aren't reasonable reasons to turn that maybe into a NO... please stop to give that kind of answers. or both... -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

multi recordset and data type check was: Re: [GENERAL] PL/pgSQL stored procedure returning multiple result sets (SELECTs)?

2008-10-13 Thread Ivan Sergio Borgonovo
statements since they will need 2 connections. But from the client side, suppose it PHP... if the first statement return no record and the second one return 3 records, how can I know? What about functions like pg_num_fields? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql

Re: [GENERAL] Re: multi recordset and data type check was: Re: PL/pgSQL stored procedure returning multiple result sets (SELECTs)?

2008-10-13 Thread Ivan Sergio Borgonovo
Interesting. Out of curiosity, what language are you using? For MySQL I've been mostly using PHP, occasionally Java, Python and C. pardon the noise I forgot to check mysql*i* functions. thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql

Re: [GENERAL] multi recordset and data type check was: Re: PL/pgSQL stored procedure returning multiple result sets (SELECTs)?

2008-10-13 Thread Ivan Sergio Borgonovo
Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] drupal 6.x fixes for PostgreSQL 8.3 available

2008-10-11 Thread Ivan Sergio Borgonovo
by upstream. If you forget about people regularly shouting to drop postgresql support because it delay drupal releases... drupal is reasonably postgresql friendly... even if it could get better. unless he run into a lot of autocast breakage... -- Ivan Sergio Borgonovo http://www.webthatworks.it

[GENERAL] object references and renaming was: Why Does UPDATE Take So Long?

2008-10-01 Thread Ivan Sergio Borgonovo
cascade, ... ); and I alter table farm rename to farm_t; alter table farm2 rename to farm; drop table farm_t; or similar situations... where could I incur in troubles using RENAME (for tables, columns etc...)? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general

Re: [GENERAL] object references and renaming was: Why Does UPDATE Take So Long?

2008-10-01 Thread Ivan Sergio Borgonovo
...)? OTOH, your rename trick will work for such functions :) I think the problem arise from dependencies following the name and dependencies following the object (table). It seems that in these cases what is chosen is due to the difficulty to do otherwise. -- Ivan Sergio Borgonovo http

[GENERAL] FAQ: how to read EXPLAYN ANALYZE and act upon

2008-09-17 Thread Ivan Sergio Borgonovo
? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] MERGE: performance advices

2008-09-02 Thread Ivan Sergio Borgonovo
problems. The tables I'm dealing with are read only for everything else other than the merge process. thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org

[GENERAL] update and group by/aggregate

2008-08-27 Thread Ivan Sergio Borgonovo
expect {az,e,i,} -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] loop vs. aggregate was: update and group by/aggregate

2008-08-27 Thread Ivan Sergio Borgonovo
On Wed, 27 Aug 2008 10:32:43 +0200 Ivan Sergio Borgonovo [EMAIL PROTECTED] wrote: create or replace function UpdateAuthors() returns void as $$ declare _row record; _ItemID bigint; _Authors varchar(1024); _Name varchar(50); begin _Authors:=''; _ItemID:=null; for _row

Re: [GENERAL] loop vs. aggregate was: update and group by/aggregate

2008-08-27 Thread Ivan Sergio Borgonovo
On Wed, 27 Aug 2008 12:45:42 +0100 Sam Mason [EMAIL PROTECTED] wrote: On Wed, Aug 27, 2008 at 01:19:30PM +0200, Ivan Sergio Borgonovo wrote: but this looks much slower than the function: function: 113sec vs. single statement: 488sec I repeated the test 3 times with similar results

Re: [GENERAL] loop vs. aggregate was: update and group by/aggregate

2008-08-27 Thread Ivan Sergio Borgonovo
On Wed, 27 Aug 2008 14:47:24 +0100 Sam Mason [EMAIL PROTECTED] wrote: On Wed, Aug 27, 2008 at 02:58:18PM +0200, Ivan Sergio Borgonovo wrote: On Wed, 27 Aug 2008 12:45:42 +0100 Sam Mason [EMAIL PROTECTED] wrote: Have you been vacuuming (non-full) between runs? and as always

Re: [GENERAL] playing with catalog tables limits? dangers? was: seq bug 2073 and time machine

2008-08-26 Thread Ivan Sergio Borgonovo
languages have more complex refactoring tools) on DB definition, without having to use grep and sed on a plain text backup. thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] on delete cascade slowing down delete

2008-08-25 Thread Ivan Sergio Borgonovo
damn slow to have result in a useful time. I re engineered the tables and now the stuff works at a reasonable speed. Does the planner optimise multiple statements in a transaction or just a statement at a time? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing

[GENERAL] playing with catalog tables limits? dangers? was: seq bug 2073 and time machine

2008-08-25 Thread Ivan Sergio Borgonovo
On Sun, 24 Aug 2008 17:26:24 -0400 Alvaro Herrera [EMAIL PROTECTED] wrote: Ivan Sergio Borgonovo wrote: I was trying to drop a serial. Dropped the default for a column. Now it seems I can't drop the sequence since I incurred in: http://archives.postgresql.org/pgsql-bugs/2005-11/msg00304

Re: [GENERAL] playing with catalog tables limits? dangers? was: seq bug 2073 and time machine

2008-08-25 Thread Ivan Sergio Borgonovo
On Mon, 25 Aug 2008 12:07:23 -0400 Tom Lane [EMAIL PROTECTED] wrote: Ivan Sergio Borgonovo [EMAIL PROTECTED] writes: Alvaro Herrera [EMAIL PROTECTED] wrote: If you're feeling corageous, you can remove the pg_depend entries for that sequence. Make sure to try it in a transaction and drop

[GENERAL] psql vs. pgadmin3 was:can't get UPDATE ... RETURNING ... INTO ... to compile successfully

2008-08-23 Thread Ivan Sergio Borgonovo
searchreplace and regexp, so I definitively would enjoy psql more... but what about the rest? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] psql vs. pgadmin3 was:can't get UPDATE ... RETURNING ... INTO ... to compile successfully

2008-08-23 Thread Ivan Sergio Borgonovo
On Sat, 23 Aug 2008 11:41:41 -0600 Scott Marlowe [EMAIL PROTECTED] wrote: On Sat, Aug 23, 2008 at 10:28 AM, Ivan Sergio Borgonovo [EMAIL PROTECTED] wrote: On Fri, 22 Aug 2008 18:34:53 -0600 Scott Marlowe [EMAIL PROTECTED] wrote: Glad you got your problem resolved. I have to admit I

Re: [GENERAL] on delete cascade slowing down delete

2008-08-22 Thread Ivan Sergio Borgonovo
empty and... should I reindex s if I delete from s first if I want some speed up on delete from p; Anyway this looks more and more a dead end once things get more and more complicated since it requires too much bookkeeping. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql

[GENERAL] seq bug 2073 and time machine

2008-08-22 Thread Ivan Sergio Borgonovo
I was trying to drop a serial. Dropped the default for a column. Now it seems I can't drop the sequence since I incurred in: http://archives.postgresql.org/pgsql-bugs/2005-11/msg00304.php Is there a way I can still delete the sequence without using a backup? -- Ivan Sergio Borgonovo http

Re: [GENERAL] LIKE and SIMILAR TO

2008-08-22 Thread Ivan Sergio Borgonovo
. MySQL in such case. Anyway I'd tweak postgresql.conf before complaining it is slower than MySQL. I've been surprised as well at how postgresql can be fast. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

[GENERAL] on delete cascade slowing down delete

2008-08-21 Thread Ivan Sergio Borgonovo
clue. Any hint to track down the problem? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] on delete cascade slowing down delete

2008-08-21 Thread Ivan Sergio Borgonovo
from a simpler delete from p; ? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] NOT DEFERRABLE as default, why and how to manage it.

2008-08-19 Thread Ivan Sergio Borgonovo
default? Is there any shortcut if I've to change to deferrable most of my constraints? Other than pgfoundry is there any other recipe repository where to look for refactoring tools for postgresql? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list

Re: [GENERAL] NOT DEFERRABLE as default, why and how to manage it.

2008-08-19 Thread Ivan Sergio Borgonovo
On Tue, 19 Aug 2008 11:20:08 +0300 Peter Eisentraut [EMAIL PROTECTED] wrote: Am Tuesday, 19. August 2008 schrieb Ivan Sergio Borgonovo: I just learnt that NOT DEFERRABLE is default. Is it mandated by SQL standard? Yes. Is there any reason they put it that way in the standard other than

Re: [GENERAL] NOT DEFERRABLE as default, why and how to manage it.

2008-08-19 Thread Ivan Sergio Borgonovo
On Tue, 19 Aug 2008 10:49:11 +0200 Ivan Sergio Borgonovo [EMAIL PROTECTED] wrote: On Tue, 19 Aug 2008 11:20:08 +0300 Peter Eisentraut [EMAIL PROTECTED] wrote: Am Tuesday, 19. August 2008 schrieb Ivan Sergio Borgonovo: I just learnt that NOT DEFERRABLE is default. Is it mandated by SQL

[GENERAL] on cascade delete performances, transaction and set constraints deferred

2008-08-18 Thread Ivan Sergio Borgonovo
RAID 5, ~600K records in p and s1 5min. What should be the correct way to do it without too much bookkeeping? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] on cascade delete performances, transaction and set constraints deferred

2008-08-18 Thread Ivan Sergio Borgonovo
On Mon, 18 Aug 2008 15:16:01 -0400 Tom Lane [EMAIL PROTECTED] wrote: Ivan Sergio Borgonovo [EMAIL PROTECTED] writes: I'm not sure what's really happening but why apparently the delete statements get executed before the 2 inserts even if constraints are deferred? You didn't mark the FK

[GENERAL] explain inside begin; commit;

2008-08-18 Thread Ivan Sergio Borgonovo
alternative approach? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] \copy, transactions and permissions

2008-08-17 Thread Ivan Sergio Borgonovo
On Wed, 13 Aug 2008 16:32:18 -0500 ries van Twisk [EMAIL PROTECTED] wrote: On Aug 13, 2008, at 4:25 PM, Ivan Sergio Borgonovo wrote: I need to write an import function with enough isolation from apache daemon. Code has no input other than cvs files and a signal about when to start

[GENERAL] \copy, transactions and permissions

2008-08-13 Thread Ivan Sergio Borgonovo
and is it going to be rolled back if something goes wrong? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] equivalent of using namespace with schema

2008-08-05 Thread Ivan Sergio Borgonovo
Is there anything simpler than processing the search_path to obtain the same effect of using namespace XXX or if I'd like to execute the same set of operations on the same objects just in a different schema? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general

Re: [GENERAL] eliminating records not in (select id ... so SLOW?

2008-08-04 Thread Ivan Sergio Borgonovo
On Fri, 01 Aug 2008 10:33:59 -0400 Tom Lane [EMAIL PROTECTED] wrote: Ivan Sergio Borgonovo [EMAIL PROTECTED] writes: Well I reached 3Gb of work_mem and still I got: Seq Scan on catalog_categoryitem (cost=31747.84..4019284477.13 rows=475532 width=6) Filter: (NOT (subplan

Re: [GENERAL] eliminating records not in (select id ... so SLOW?

2008-08-01 Thread Ivan Sergio Borgonovo
On Thu, 31 Jul 2008 21:37:39 -0400 Tom Lane [EMAIL PROTECTED] wrote: Ivan Sergio Borgonovo [EMAIL PROTECTED] writes: I'm doing something like: delete from table1 where id not in (select id from table2). table1 contains ~1M record table2 contains ~ 600K record and id is unique. That's

[GENERAL] function definition and entity

2008-08-01 Thread Ivan Sergio Borgonovo
to automatically check if all references are to the correct existing function? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] use of column in COPY

2008-08-01 Thread Ivan Sergio Borgonovo
what's the use of column in the COPY FROM syntax if I get: ERROR: extra data after last expected column I've read: http://bytes.com/forum/thread424089.html but then... is there any actual use? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list

Re: [GENERAL] eliminating records not in (select id ... so SLOW?

2008-08-01 Thread Ivan Sergio Borgonovo
On Fri, 01 Aug 2008 10:33:59 -0400 Tom Lane [EMAIL PROTECTED] wrote: Ivan Sergio Borgonovo [EMAIL PROTECTED] writes: Well I reached 3Gb of work_mem and still I got: Seq Scan on catalog_categoryitem (cost=31747.84..4019284477.13 rows=475532 width=6) Filter: (NOT (subplan

[GENERAL] eliminating records not in (select id ... so SLOW?

2008-07-31 Thread Ivan Sergio Borgonovo
for over 2h now. Is it normal? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] eliminating records not in (select id ... so SLOW?

2008-07-31 Thread Ivan Sergio Borgonovo
). PostgreSQL comes from the default install from Debian etch (8.1.X). It's configuration hasn't been modified. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [GENERAL] php + postgresql

2008-07-24 Thread Ivan Sergio Borgonovo
)) ? or just echo $content doesn't return output? what about $content .= $row[0]. # ; for quick debugging? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [GENERAL] php + postgresql

2008-07-24 Thread Ivan Sergio Borgonovo
in /home/ivan/- on line 2 Call Stack: 18.39231079256 1. {main}() /home/ivan/-:0 18.39241079528 2. pg_fetch_array() /home/ivan/-:2 It can't be the problem. BTW even passing a string will end up in the same error. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via

Re: [GENERAL] php + postgresql

2008-07-24 Thread Ivan Sergio Borgonovo
. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] functional index not used, looping simpler query just faster

2008-07-10 Thread Ivan Sergio Borgonovo
Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] expected O^2 looks line K^O, index problem not involved: [was] looping simpler query just faster

2008-07-10 Thread Ivan Sergio Borgonovo
On Thu, 10 Jul 2008 11:50:01 +0200 Martijn van Oosterhout [EMAIL PROTECTED] wrote: On Thu, Jul 10, 2008 at 11:40:40AM +0200, Ivan Sergio Borgonovo wrote: I've this: What's basically killing you is this condition: select i2.ItemID from catalog_items i2 inner join catalog_brands b2

Re: [GENERAL] expected O^2 looks line K^O, index problem not involved: [was] looping simpler query just faster

2008-07-10 Thread Ivan Sergio Borgonovo
On Thu, 10 Jul 2008 15:52:54 +0200 Martijn van Oosterhout [EMAIL PROTECTED] wrote: On Thu, Jul 10, 2008 at 02:19:30PM +0200, Ivan Sergio Borgonovo wrote: On Thu, 10 Jul 2008 11:50:01 +0200 Martijn van Oosterhout [EMAIL PROTECTED] wrote: Hmm, I just studied your query to determine what

Re: [GENERAL] functional index not used, looping simpler query just faster

2008-07-10 Thread Ivan Sergio Borgonovo
On Thu, 10 Jul 2008 10:46:53 -0400 Tom Lane [EMAIL PROTECTED] wrote: Ivan Sergio Borgonovo [EMAIL PROTECTED] writes: Now I try this: explain select i1.brands, i1.name, i1.dataPub, i1.datainserimento from catalog_items i1 inner join catalog_brands b1 on upper(i1.brands)=upper(b1

{SOLVED?] Re: [GENERAL] functional index not used, looping simpler query just faster

2008-07-10 Thread Ivan Sergio Borgonovo
in the last insert. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] importing data via SQL statements and different column names

2008-07-07 Thread Ivan Sergio Borgonovo
the exported format will change to a better one. do update if(not found) insert incur in a major slowdown? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref

[GENERAL] table inheritance and uniform access

2008-06-24 Thread Ivan Sergio Borgonovo
to rewrite the schema. I'm trying to force all this stuff in the DB rather than on the client code since this code should be wrapped in a serializable transaction. I can't see any way to use postgresql own inheritance system. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql

Re: [GENERAL] Multiple result sets

2008-06-01 Thread Ivan Sergio Borgonovo
or the serializable transaction. My understanding was that the serializable transaction will fail. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref

Re: [GENERAL] Postgresql MVCC, Read Committed Isolation Level and taking snapshot

2008-05-21 Thread Ivan Sergio Borgonovo
On Tue, 20 May 2008 17:04:25 -0400 Andrew Sullivan [EMAIL PROTECTED] wrote: On Tue, May 20, 2008 at 08:56:41PM +0200, Ivan Sergio Borgonovo wrote: I just would like to have a coherent snapshot of some tables. If you have a multi-statement transaction, then if you are in READ COMMITTED

Re: [GENERAL] Postgresql MVCC, Read Committed Isolation Level and taking snapshot

2008-05-20 Thread Ivan Sergio Borgonovo
On Fri, 16 May 2008 09:55:56 -0400 Andrew Sullivan [EMAIL PROTECTED] wrote: On Fri, May 16, 2008 at 09:06:11AM +0200, Ivan Sergio Borgonovo wrote: Is BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE what I'm looking for? Yes. OK... What if I want to avoid the rollback problem and avoid

Re: [GENERAL] Postgresql MVCC, Read Committed Isolation Level and taking snapshot

2008-05-18 Thread Ivan Sergio Borgonovo
On Fri, 16 May 2008 09:55:56 -0400 Andrew Sullivan [EMAIL PROTECTED] wrote: On Fri, May 16, 2008 at 09:06:11AM +0200, Ivan Sergio Borgonovo wrote: Is BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE what I'm looking for? Yes. Perfect, thanks. What is the effect of having nested

[GENERAL] Postgresql MVCC, Read Committed Isolation Level and taking snapshot

2008-05-16 Thread Ivan Sergio Borgonovo
what I'm looking for? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] sp: error message not coherent with actual code

2008-05-15 Thread Ivan Sergio Borgonovo
statement SQL statement SELECT b2c._OrderGroupID from Basket2Order( $1 ) as b2c ? Commenting that line the error goes away. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] sp: error message not coherent with actual code

2008-05-15 Thread Ivan Sergio Borgonovo
On Thu, 15 May 2008 20:36:21 +0200 Ivan Sergio Borgonovo [EMAIL PROTECTED] wrote: I've this line in a sp: select into _OrderGroupID b2c._OrderGroupID from Basket2Order(_BasketID) as b2c; but I get this error: SELECT query has no destination for result data HINT: If you want to discard

Re: [GENERAL] Couple of question on functions

2008-05-14 Thread Ivan Sergio Borgonovo
(); update t1 set a=5; So I'd expect ft() return always (1,1) or (5,5). Since select * from ft(); is one statement... it should see only data that were committed when select started. But actually I can obtain (1,5) ??? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql

choiche of function language was: Re: [GENERAL] dynamic procedure call

2008-05-10 Thread Ivan Sergio Borgonovo
of the advantage of plpython or plperl over plpgsql, but then what are the advantages of plpgsql over the rest of the crowd other than resembling the language used in Oracle? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Returning RECORD from PGSQL without custom type?

2008-05-10 Thread Ivan Sergio Borgonovo
; I'm not sure if you can... Does this feature request make sense to everyone? It would make programming set returning record functions a lot easier. yeah it could be a nice shortcut to define types locally. Once you call OUT the type, you could avoid the ret1:=row. -- Ivan Sergio Borgonovo

[GENERAL] storing long live parameters

2008-05-06 Thread Ivan Sergio Borgonovo
if they are not and refresh their values cycles of create or replace... if they actually get refreshed... but I'd like to see if there are other options. thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] taking actions on rollback (PHP)

2008-04-27 Thread Ivan Sergio Borgonovo
On Sat, 26 Apr 2008 20:58:06 -0600 Scott Marlowe [EMAIL PROTECTED] wrote: On Sat, Apr 26, 2008 at 4:19 PM, Ivan Sergio Borgonovo [EMAIL PROTECTED] wrote: With the added @ everything seemed to be OK. No, the @ is just making php quietly swallow the postgresql errors that are being

Re: [GENERAL] taking actions on rollback (PHP)

2008-04-27 Thread Ivan Sergio Borgonovo
still end up in mangled objects... but still better than nothing. thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] taking actions on rollback (PHP)

2008-04-26 Thread Ivan Sergio Borgonovo
always succede so the cleanup never get executed. How am I going to see if the transaction succeeded without checking what happens for each statement and getting the cleanup code execute? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql

Re: [GENERAL] taking actions on rollback (PHP)

2008-04-26 Thread Ivan Sergio Borgonovo
On Sat, 26 Apr 2008 23:14:07 +0200 Martijn van Oosterhout [EMAIL PROTECTED] wrote: On Sat, Apr 26, 2008 at 10:52:12PM +0200, Ivan Sergio Borgonovo wrote: How am I going to see if the transaction succeeded without checking what happens for each statement and getting the cleanup code

[GENERAL] Debian etch, backport postgresql 8.3 experiences?

2008-04-23 Thread Ivan Sergio Borgonovo
... -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Debian etch, backport postgresql 8.3 experiences?

2008-04-23 Thread Ivan Sergio Borgonovo
On Wed, 23 Apr 2008 12:04:08 +0200 Peter Eisentraut [EMAIL PROTECTED] wrote: Am Mittwoch, 23. April 2008 schrieb Ivan Sergio Borgonovo: I'd like to know if anyone has experience in using postgresql 8.3 for amd64. There are probably thousands of people with that experience. I'd like

Re: [GENERAL] Unacceptable postgres performance vs. Microsoft sqlserver

2008-04-14 Thread Ivan Sergio Borgonovo
; But why once you add the index and count distinct the performances are still so far? I'd say that counting in this case is not the hardest thing to do, but rather the distinct part. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] Unacceptable postgres performance vs. Microsoft sqlserver

2008-04-14 Thread Ivan Sergio Borgonovo
On Mon, 14 Apr 2008 21:30:15 +0100 Gregory Stark [EMAIL PROTECTED] wrote: Ivan Sergio Borgonovo [EMAIL PROTECTED] writes: But why once you add the index and count distinct the performances are still so far? I'd say that counting in this case is not the hardest thing to do, but rather

Re: [GENERAL] SQL injection, php and queueing multiple statement

2008-04-13 Thread Ivan Sergio Borgonovo
... but that again just comes back to proper code review to ensure it's used. Why does it have to be global, couldn't it be by connection or by call to pg_query? On Sun, 13 Apr 2008 00:13:49 +0100 Sam Mason [EMAIL PROTECTED] wrote: On Sat, Apr 12, 2008 at 11:06:42PM +0200, Ivan Sergio Borgonovo wrote

Re: [GENERAL] SQL injection, php and queueing multiple statement

2008-04-13 Thread Ivan Sergio Borgonovo
nice if all else fails and will block a many of the most flexible types of SQL injection attack. I just think that if it exists it needs to be opt-out, not opt-in, to be significantly effective as a defense against other programming errors. thanks -- Ivan Sergio Borgonovo http

Re: [GENERAL] SQL injection, php and queueing multiple statement

2008-04-13 Thread Ivan Sergio Borgonovo
On Sun, 13 Apr 2008 11:49:58 +0200 Martijn van Oosterhout [EMAIL PROTECTED] wrote: On Sun, Apr 13, 2008 at 10:37:52AM +0200, Ivan Sergio Borgonovo wrote: Because you appear to be seeking something to protect against programmers who do not follow coding guidelines, and that should help

Re: [GENERAL] SQL injection, php and queueing multiple statement

2008-04-12 Thread Ivan Sergio Borgonovo
queued statements seemed a cheap barrier but with a reasonably good ROI. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] SQL injection, php and queueing multiple statement

2008-04-12 Thread Ivan Sergio Borgonovo
On Sat, 12 Apr 2008 12:39:38 -0400 Tom Lane [EMAIL PROTECTED] wrote: Ivan Sergio Borgonovo [EMAIL PROTECTED] writes: I may sound naive but having a way to protect the DB from this kind of injections looks as a common problem, I'd thought there was already a common solution. Use prepared

Re: [GENERAL] SQL injection, php and queueing multiple statement

2008-04-12 Thread Ivan Sergio Borgonovo
at it. Working with libraries doesn't make it always feasible and it is far more complicated than just forbidding extra statement in each call to pg_query. thx -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

[GENERAL] SQL injection, php and queueing multiple statement

2008-04-11 Thread Ivan Sergio Borgonovo
Is there a switch (php side or pg side) to avoid things like: pg_query(select id from table1 where a=$i); into becoming pg_query(select id from table1 where a=1 and 1=1; do something nasty; -- ); So that every pg_query(...) can contain no more than one statement? thanks -- Ivan Sergio

Re: [GENERAL] SQL injection, php and queueing multiple statement

2008-04-11 Thread Ivan Sergio Borgonovo
with part of the framework I'm working with. And still I'm looking for a security net even in the case someone is not respecting the policies. thx -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Quoting table/column names vs performance

2008-04-09 Thread Ivan Sergio Borgonovo
. pg_get_serial_sequence I'm thinking to write a script to quote all identifiers... but I'm worried it will look to much as a parser rather than a simple sed script since I got trapped by the above too. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] creating a temp table in a function

2008-04-04 Thread Ivan Sergio Borgonovo
), I get no error. Is this expected behavior? If so, why? http://www.postgresql.org/docs/faqs.FAQ.html#item4.19 ? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

[GENERAL] is it helpful for the optimiser/planner to add LIMIT 1

2008-04-03 Thread Ivan Sergio Borgonovo
myfunction(3,5) limit 1; select into a,b x,y from tablename where z=5 and u=7 limit 1; select a,b from from tablename where z=5 and u=7 limit 1; thx -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] is it helpful for the optimiser/planner to add LIMIT 1

2008-04-03 Thread Ivan Sergio Borgonovo
it here and there as an optimisation flag? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] HOWTO caching data across function calls: temporary tables, cursor?

2008-04-01 Thread Ivan Sergio Borgonovo
-- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] HOWTO caching data across function calls: temporary tables, cursor?

2008-04-01 Thread Ivan Sergio Borgonovo
On Tue, 1 Apr 2008 12:01:21 +0200 Albe Laurenz [EMAIL PROTECTED] wrote: Ivan Sergio Borgonovo wrote: I've a bunch of functions that operates on the basket (a smaller list of products with their attributes). So many functions ends up in repeating over and over a select similar

Re: [GENERAL] HOWTO caching data across function calls: temporary tables, cursor?

2008-04-01 Thread Ivan Sergio Borgonovo
On Tue, 1 Apr 2008 14:00:39 +0200 Albe Laurenz [EMAIL PROTECTED] wrote: Ivan Sergio Borgonovo wrote: It doesn't look as I can do the same stuff with array and tables/records. Many times I use joint or aggregates on the basket. Sorry, my example was unclear. I was the first

[GENERAL] optimiser STABLE vs. temp table was: HOWTO caching data across function calls: temporary tables, cursor?

2008-04-01 Thread Ivan Sergio Borgonovo
declaring a function STABLE? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] optimiser STABLE vs. temp table was: HOWTO caching data across function calls: temporary tables, cursor?

2008-04-01 Thread Ivan Sergio Borgonovo
On Tue, 01 Apr 2008 11:22:20 -0400 Tom Lane [EMAIL PROTECTED] wrote: Ivan Sergio Borgonovo [EMAIL PROTECTED] writes: I can't really appreciate the difference... or better... I think the difference may be that I can't take for granted the function will be cached if I delegate the choice

[GENERAL] still on techniques to cache table slices was: optimiser STABLE vs. temp table

2008-04-01 Thread Ivan Sergio Borgonovo
On Tue, 1 Apr 2008 18:32:25 +0200 Martijn van Oosterhout [EMAIL PROTECTED] wrote: On Tue, Apr 01, 2008 at 06:06:35PM +0200, Ivan Sergio Borgonovo wrote: Would you please be so kind to rephrase: http://www.postgresql.org/docs/8.1/interactive/xfunc-volatility.html snip I can't

Re: [GENERAL] shortcut for select * where id in (arrayvar)

2008-03-31 Thread Ivan Sergio Borgonovo
On Sun, 30 Mar 2008 21:40:52 -0400 Tom Lane [EMAIL PROTECTED] wrote: Ivan Sergio Borgonovo [EMAIL PROTECTED] writes: for _row in select err, msg from errortable where err in (errcode) where errcode is an array. That syntax doesn't work... In recent PG releases it will work

[GENERAL] round() and cast to numeric

2008-03-31 Thread Ivan Sergio Borgonovo
I've some real around and some round as well. round() just accept dp and numeric. What' going to be the difference between casting to numeric and rounding? thx -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

[GENERAL] returning array from function or structured error

2008-03-30 Thread Ivan Sergio Borgonovo
or building up a bitmap look awful. Any elegant idea? thx -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] shortcut for select * where id in (arrayvar)

2008-03-30 Thread Ivan Sergio Borgonovo
errcode is an array. That syntax doesn't work... is there any alternative syntax to keep stuff short and not error prone? I could serialise the array and build up the string of the where err in (..) but it doesn't make things look that better. thx -- Ivan Sergio Borgonovo http

<    1   2   3   4   5   6   >