Re: [SQL] advocacy: case studies

2008-04-07 Thread Erik Jones
That's really cool. On Apr 7, 2008, at 3:33 PM, Ivan Sergio Borgonovo wrote: Can it be one of those things that end up in the "case studies" http://www.postgresql.org/about/casestudies/ http://www.theregister.co.uk/2008/04/03/xtremedata_fpga_xeon_data_warehouse/ "The XtremeDB is built from Pos

[SQL] advocacy: case studies

2008-04-07 Thread Ivan Sergio Borgonovo
Can it be one of those things that end up in the "case studies" http://www.postgresql.org/about/casestudies/ http://www.theregister.co.uk/2008/04/03/xtremedata_fpga_xeon_data_warehouse/ "The XtremeDB is built from PostgreSQL – a full-featured, open-source RDBMS, that has been re-engineered by XD

Re: [SQL] Commit every processed record

2008-04-07 Thread Bart Degryse
Well, actually there is. Do the processing in a plperlu function which uses it's own connection to the db. Then every instance of the function will have it's own transaction. Try to start that perl connection outside the function or your performance will drop too much. I use this technique to fet

Re: [SQL] undefined relations in pg_locks

2008-04-07 Thread Tom Lane
"Sabin Coanda" <[EMAIL PROTECTED]> writes: > Unfortunatelly, I don't find the related objects of the oids of "relation" > field. Also all the fields "classid" and "objid" are null. > May I suppose there were references to temporary tables? Are you sure they are in the same database you are workin

Re: [SQL] Commit every processed record

2008-04-07 Thread Craig Ringer
[EMAIL PROTECTED] wrote: Hi, I have to execute commit for evey record that i processed during a cursor fetch in a function. There is a way to do it? Sure. Do it outside PL/PgSQL, using a database client API like those available for Python, Java, Perl, etc. If you really need to do it in P

Re: [SQL] Problem commit in function

2008-04-07 Thread Craig Ringer
[EMAIL PROTECTED] wrote: Hi, I need to execute COMMIT in a function pgsql, there is a way? A function runs in a transaction. It cannot, as far as I know, commit one. Why do you need to do that, anyway? What're you trying to achieve? -- Craig Ringer -- Sent via pgsql-sql mailing list (pgsql

Re: [SQL] how to returns set of records in PL/python

2008-04-07 Thread Gerardo Herzig
Anoop G wrote: Hi , Iam new to plpython,how can I return a recordset from a plpython function? Is there is any way give me an example; plpgsql function CREATE OR REPLACE FUNCTION function_to_get_all_countries() RETURNS SETOF RECORD AS $BODY$ DECLARE r

Re: [SQL] how to returns set of records in PL/python

2008-04-07 Thread Gerardo Herzig
Anoop G wrote: Hi , Iam new to plpython,how can I return a recordset from a plpython function? Is there is any way give me an example; plpgsql function CREATE OR REPLACE FUNCTION function_to_get_all_countries() RETURNS SETOF RECORD AS $BODY$ DECLARE r

Re: [SQL] Commit every processed record

2008-04-07 Thread A. Kretschmer
am Mon, dem 07.04.2008, um 14:46:50 +0200 mailte [EMAIL PROTECTED] folgendes: > Hi, > I have to execute commit for evey record that i processed during a cursor > fetch in a function. > There is a way to do it? No. Regards, Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0

[SQL] how to returns set of records in PL/python

2008-04-07 Thread Anoop G
Hi , Iam new to plpython,how can I return a recordset from a plpython function? Is there is any way give me an example; plpgsql function CREATE OR REPLACE FUNCTION function_to_get_all_countries() RETURNS SETOF RECORD AS $BODY$ DECLARE r RECORD; BEGIN

[SQL] Commit every processed record

2008-04-07 Thread [EMAIL PROTECTED]
Hi, I have to execute commit for evey record that i processed during a cursor fetch in a function. There is a way to do it? Thanks in advance. Luke. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Problem commit in function

2008-04-07 Thread Pavan Deolasee
On Mon, Apr 7, 2008 at 6:00 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > I need to execute COMMIT in a function pgsql, > there is a way? > No. Transaction control statements like COMMIT/ROLLBACK/SAVEPOINT are not supported inside plpgsql functions. If you can tell us what you are tr

[SQL] Problem commit in function

2008-04-07 Thread [EMAIL PROTECTED]
Hi, I need to execute COMMIT in a function pgsql, there is a way? Can I have any example? Thanks in advance. Luke. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] pl/PgSQL, variable names in NEW

2008-04-07 Thread Pavel Stehule
Hello no, it's not possible in plpgsql. Please, use plperl or plpython. Regards Pavel Stehule On 07/04/2008, Martin Edlman <[EMAIL PROTECTED]> wrote: > Hello, > > is it possible to use variables as field names in the NEW record? > Let's suppose I have a varchar attname containg the name

[SQL] pl/PgSQL, variable names in NEW

2008-04-07 Thread Martin Edlman
Hello, is it possible to use variables as field names in the NEW record? Let's suppose I have a varchar attname containg the name of the field and I want to know a value that field of the NEW record. Problem is that I get an error 'record "new" has no field "attname"'. Of course I want to u

[SQL] undefined relations in pg_locks

2008-04-07 Thread Sabin Coanda
Hi there, Sorry I repeat a problem which concerned me since two months, but I got no answer. It's not clear for me whether it is trivial or without a solution. I promisse not to repeat it in the future if I will give no answer this time too. So, I'm working with "PostgreSQL 8.2.3 on i686-redha