Re: [GENERAL] TG_COLUMNS_UPDATED

2012-07-03 Thread Bartosz Dmytrak
Hi, I am not sure if it is bullet proof, but could be good starting point. Maybe someone else could find better solution: CREATE OR REPLACE FUNCTION myschema."doCheckChanges"() RETURNS trigger AS $BODY$ DECLARE v_match_array BOOLEAN[]; v_match BOOLEAN; v_row RECORD; BEGIN FOR v_row IN SELECT

[GENERAL] TG_COLUMNS_UPDATED

2012-07-03 Thread david.sahagian
I would like another TG_* special variable to be available to a PL/pgSQL trigger-function. TG_COLUMNS_UPDATED Its value would be NULL unless: TG_OP == ' UPDATE' and TG_LEVEL == 'ROW' Data type == varbit One bit for each column of the table that the trigger is created on. 1 means that

Re: [GENERAL] function ave(integer) does not exist

2012-07-03 Thread Benedict Holland
Oh heck. Yes, I misread avg(expression as ave. Sorry for this. ~ben On Tue, Jul 3, 2012 at 2:13 PM, hubert depesz lubaczewski wrote: > On Tue, Jul 03, 2012 at 02:07:54PM -0400, Benedict Holland wrote: > > This one is confusing. The only difference in my db is that it comes > from a > > user spe

Re: [GENERAL] function ave(integer) does not exist

2012-07-03 Thread hubert depesz lubaczewski
On Tue, Jul 03, 2012 at 02:07:54PM -0400, Benedict Holland wrote: > This one is confusing. The only difference in my db is that it comes from a > user specific template not pg_default. "difference"? between what and what? > select ave(var) > from test; > **

[GENERAL] function ave(integer) does not exist

2012-07-03 Thread Benedict Holland
Hi All, This one is confusing. The only difference in my db is that it comes from a user specific template not pg_default. I run this: *** cr

Re: [GENERAL] seq-scan or index-scan

2012-07-03 Thread Tom Lane
Andreas Kretschmer writes: > production=*# explain analyse select * from boxes; > QUERY PLAN > --- > Seq Scan on boxes (cost=0.00..990783.

Re: [GENERAL] seq-scan or index-scan

2012-07-03 Thread Tomas Vondra
On 3 Červenec 2012, 17:58, Andreas Kretschmer wrote: > Dear list, > > i have a table and i'm selecting all records without a where-condition, > and i don't need a ORDER BY: > > > > production=*# explain analyse select * from boxes; > QUERY PLAN > --

[GENERAL] seq-scan or index-scan

2012-07-03 Thread Andreas Kretschmer
Dear list, i have a table and i'm selecting all records without a where-condition, and i don't need a ORDER BY: production=*# explain analyse select * from boxes; QUERY PLAN --

Re: [GENERAL] ERROR: function crosstab(unknown, unknown) does not exist

2012-07-03 Thread Tom Lane
Adrian Klaver writes: > On 07/03/2012 06:48 AM, Stefan Schwarzer wrote: >> Now, when I launch a query which includes "crosstab()" as a postgres user, >> everything works fine. However, if I launch it as user XXX, it complaints: > Are you schema qualifying the function name when you use it? > If

Re: [GENERAL] ERROR: function crosstab(unknown, unknown) does not exist

2012-07-03 Thread Adrian Klaver
On 07/03/2012 06:48 AM, Stefan Schwarzer wrote: Hi there, I am using 9.1.3. I inserted the tablefunc extension, into a SCHEMA called tablefunc, in order to separate it from my tables. I had to create it as postgres user, but changed than the Owner of both schema and functions to my user XXX.

Re: [GENERAL] Where should I start for learn development

2012-07-03 Thread Craig Ringer
On 07/03/2012 07:50 PM, AI Rumman wrote: Hello, I have been working with Postgresql for the last 3 years. Before that I worked with Oracle, Mysql and other databases. Now, its time to learn the internals of Postgresql system. I downloaded the source code and imported it in my eclipse environme

Re: [GENERAL] errors with high connections rate

2012-07-03 Thread Craig Ringer
Here's the test program, btw: https://github.com/ringerc/scrapcode/tree/master/scripts/pg_forktest pgfork.py is a home rolled fork() horror. pg_mp.py is the same thing done with Python's multiprocessing module. -- Craig Ringer

[GENERAL] ERROR: function crosstab(unknown, unknown) does not exist

2012-07-03 Thread Stefan Schwarzer
Hi there, I am using 9.1.3. I inserted the tablefunc extension, into a SCHEMA called tablefunc, in order to separate it from my tables. I had to create it as postgres user, but changed than the Owner of both schema and functions to my user XXX. Now, when I launch a query which includes "crosst

Re: [GENERAL] errors with high connections rate

2012-07-03 Thread Craig Ringer
On 07/03/2012 04:26 PM, Pawel S. Veselov wrote: That's the thing, no segfaults (dmesg), nothing in the server logs. It may as well be some sort of an anti-fork-bomb measure, only judging by the fact that with enough attempts, things do clear out, though I wish there would be some indication o

Re: [GENERAL] Where should I start for learn development

2012-07-03 Thread Chris Angelico
On Tue, Jul 3, 2012 at 9:50 PM, AI Rumman wrote: > I have been working with Postgresql for the last 3 years. Before that I > worked with Oracle, Mysql and other databases. > Now, its time to learn the internals of Postgresql system. You'll do far better with some of the essays on the Postgres sit

Re: [GENERAL] Where should I start for learn development

2012-07-03 Thread Kevin Grittner
Rob Richardson wrote: > AI Rumman wrote: >> Now, its time to learn the internals of Postgresql system. I >> downloaded the source code and imported it in my eclipse >> environment. But I have very limited knowledge on C programming. >> Could you guys please guide me from where I should start?

Re: [GENERAL] Where should I start for learn development

2012-07-03 Thread Achilleas Mantzios
No!! You just install it as package. Read the docs from the official site. Try to find your way through the docs. Reading the docs should prevent asking such trivial questions in the first place. Why do you want to involve Eclipse in this? On Τρι 03 Ιουλ 2012 17:50:44 AI Rumman wrote: Hello,

Re: [GENERAL] errors with high connections rate

2012-07-03 Thread Kevin Grittner
John R Pierce > On 07/03/12 12:34 AM, Craig Ringer wrote: >> I'm seriously impressed that your system is working under load at >> all with 800 concurrent connections fighting to write all at once. > > indeed, in my transactional benchmarks on a 12 core, 24 thread dual > xeon x5600 class systems,

Re: [GENERAL] Notiffy problem

2012-07-03 Thread Kevin Grittner
adasko98 wrote: > Hi thanks for help. Now i know why pg_notify() does not works for > me. I'm named listener in c# code 'Demo' and this is a problem. In > name can't be a capital letter because postges change this name to > small letter i think. So if someone want use pg_notify use only > small

Re: [GENERAL] Where should I start for learn development

2012-07-03 Thread Rob Richardson
I think maybe the best question to ask in response to yours is: why? Is there something you think should be improved? Is there some question you have about how it works or how it should be used or why you are getting some result instead of the result you're expecting? Do you want to use the

[GENERAL] Where should I start for learn development

2012-07-03 Thread AI Rumman
Hello, I have been working with Postgresql for the last 3 years. Before that I worked with Oracle, Mysql and other databases. Now, its time to learn the internals of Postgresql system. I downloaded the source code and imported it in my eclipse environment. But I have very limited knowledge on C pr

Re: [GENERAL] Notiffy problem

2012-07-03 Thread adasko98
Hi thanks for help. Now i know why pg_notify() does not works for me. I'm named listener in c# code 'Demo' and this is a problem. In name can't be a capital letter because postges change this name to small letter i think. So if someone want use pg_notify use only small letter like this "pg_notify('

Re: [GENERAL] errors with high connections rate

2012-07-03 Thread Pawel S. Veselov
On 07/03/2012 12:34 AM, Craig Ringer wrote: On 07/03/2012 03:19 PM, Pawel Veselov wrote: Hi. -- problem 1 -- I have an application, using libpq, connecting to postgres 9.1.3 (Amazon AMI distro). The application writes data at a high rate (at this point it's 500 transaction per second), using

Re: [GENERAL] errors with high connections rate

2012-07-03 Thread Pawel S. Veselov
On 07/03/2012 12:54 AM, John R Pierce wrote: On 07/03/12 12:34 AM, Craig Ringer wrote: I'm seriously impressed that your system is working under load at all with 800 concurrent connections fighting to write all at once. indeed, in my transactional benchmarks on a 12 core, 24 thread dual xeon

Re: [GENERAL] errors with high connections rate

2012-07-03 Thread John R Pierce
On 07/03/12 12:34 AM, Craig Ringer wrote: I'm seriously impressed that your system is working under load at all with 800 concurrent connections fighting to write all at once. indeed, in my transactional benchmarks on a 12 core, 24 thread dual xeon x5600 class systems, with 16 or 20 spindle rai

Re: [GENERAL] errors with high connections rate

2012-07-03 Thread Craig Ringer
On 07/03/2012 03:19 PM, Pawel Veselov wrote: Hi. -- problem 1 -- I have an application, using libpq, connecting to postgres 9.1.3 (Amazon AMI distro). The application writes data at a high rate (at this point it's 500 transaction per second), using multiple threads (at this point it's 800).

[GENERAL] errors with high connections rate

2012-07-03 Thread Pawel Veselov
Hi. -- problem 1 -- I have an application, using libpq, connecting to postgres 9.1.3 (Amazon AMI distro). The application writes data at a high rate (at this point it's 500 transaction per second), using multiple threads (at this point it's 800). These are "worker" threads, that receive "message