On 2006-10-15, Niederland [EMAIL PROTECTED] wrote:
Before postgresql 8.1.5, I could do the following to find the first
lead that created a prospect in my application.
SELECT
Lead.LeadID,
Prospect.ProspectID
FROM
Prospect INNER JOIN Lead USING (ProspectID)
WHERE
Lead.CreationDate
David Fetter wrote:
It would be handy for things like pgpool and Continuent, which could
reliably distinguish up front the difference between a transaction
that can write and one that can safely be sliced up and dispatched to
read-only databases.
Yes, I think that would be the use case. I
Hello, I have this doubt since I started using PostgreSQL, a few months ago.Why triggers are defined that way? I mean, in others DBMS you simply write:CREATE TRIGGER trigger_name ... bla bla bla
BEGIN END;Why you should write a function first and then the trigger, which must call that
Why you should write a function first and then the trigger, which must
call that function?
What are the advantages/disadvantages of that? Where can I find more
information?
The PG way seems very natural to me:
you can write functions that do something and then have many triggers
call that
I have a five company Postgres 8.1 database.
Each company data is stored in a different schema named Company1, Company2,
..., Company5
There is also public schema which contains common data.
Now customer wants to add sixth company to database.
In need to add some routine to my application
On 10/14/06, Chris Mair [EMAIL PROTECTED] wrote:
The interesting part is the graph that shows updates / sec real time
vs. running total of updates:
http://www.1006.org/misc/20061014_pgupdates_bench/results.png
one small thing: the variances inside the trendline are caused by
using integer
am Sun, dem 15.10.2006, um 19:10:53 +0300 mailte Andrus folgendes:
I have a five company Postgres 8.1 database.
Each company data is stored in a different schema named Company1, Company2,
..., Company5
There is also public schema which contains common data.
Now customer wants to add
Chris Mair [EMAIL PROTECTED] writes:
Why you should write a function first and then the trigger, which must
call that function?
... there's not just PL/PGSQL: you might want
to define a function in C or Perl and then have a trigger call it.
Right, that's the real reason: this approach
Merlin Moncure wrote:
On 10/14/06, Chris Mair [EMAIL PROTECTED] wrote:
The interesting part is the graph that shows updates / sec real time
vs. running total of updates:
http://www.1006.org/misc/20061014_pgupdates_bench/results.png
one small thing: the variances inside the trendline are
Andrew Sullivan [EMAIL PROTECTED] writes:
On Fri, Oct 13, 2006 at 01:35:51PM -0400, Tom Lane wrote:
looked reasonably robust --- ie, both safe and not full of unsupportable
assumptions about knowing exactly where everything actually is on the
disk platter. It'd still be interesting if anyone
Before postgresql 8.1.5, I could do the following to find the first
lead that created a prospect in my application.
SELECT
Lead.LeadID,
Prospect.ProspectID
FROM
Prospect INNER JOIN Lead USING (ProspectID)
WHERE
Lead.CreationDate = (SELECT MIN(Lead.CreationDate) FROM Lead AS LL
WHERE
Hi,
I've been seeing an issue with 8.1.4 that seems to be caused by the
way UPDATE operations prefer to place the new row version in the
same page as the original row. The issue is specific to UPDATEs;
it does not occur when each UPDATE is replaced by a DELETE/INSERT
pair. The problem can
Sorry working to late at night Query works just a typo
the following works.
WHERE
Lead.CreationDate = (SELECT MIN(LL.CreationDate) FROM Lead AS LL
WHERE LL.ProspectID = Lead.ProspectID)
sorry for the previous post,
Roger
Niederland wrote:
Before postgresql 8.1.5, I could do the
Hi,
I'm trying to write a trigger function, that would update an
'associated' TEBLE on INSERT to master table:
CREATE TABLE master (id int not null unique, info text, );
CREATE TABLE aux (master int references master(id), info text, ...);
CREATE FUNCTION adjust() RETURNS trigger AS $$ BEGIN
On Sun, 2006-10-15 at 20:01 +0200, Rafal Pietrak wrote:
new.id := 1000-old.id;
Sory, correction.
Of cource, this ID update looks more like the following (OLD.* isn't
valid at this point):
new.id := 1000 - new.id;
--
-R
---(end of
Ian Dowse wrote:
I've been seeing an issue with 8.1.4 that seems to be caused by the
way UPDATE operations prefer to place the new row version in the
same page as the original row. The issue is specific to UPDATEs;
it does not occur when each UPDATE is replaced by a DELETE/INSERT
pair. The
Rafal Pietrak [EMAIL PROTECTED] writes:
CREATE TABLE master (id int not null unique, info text, );
CREATE TABLE aux (master int references master(id), info text, ...);
CREATE FUNCTION adjust() RETURNS trigger AS $$ BEGIN
new.id := 1000-old.id;
INSERT INTO aux (master, info)
Alvaro Herrera [EMAIL PROTECTED] writes:
Using the same page for an updated tuple is generally a useful
optimization, so I don't think you have much hopes for having it
disabled.
Especially not since there's no very reasonable way for anything as
low-level as heap_update to know that the table
On Sun, 2006-10-15 at 15:15 -0400, Tom Lane wrote:
Well, of course not: it's a BEFORE trigger, so the row insertion hasn't
actually happened yet. I think you need to split this operation into a
BEFORE trigger that changes the ID, and an AFTER trigger that propagates
the data into the other
Rafal Pietrak [EMAIL PROTECTED] writes:
Hmm. I tried that, But I'm stuck with finding a way to propagate the
'intermediate data' between BEFORE/AFTER triggers, *outside* of a TABLE
structure. That data is easily accesable inside the BEFORE TRIGGER as
simple variable.
Um ... what data do you
On Sunday 15 October 2006 10:57, Susemail wrote:
On Saturday 14 October 2006 07:19, Anders Johansson wrote:
On Thu, 2006-10-12 at 18:28 -1000, Susemail wrote:
With respect to the AMD Athlon(tm) 64 X2 Dual Core Processor 4800+ are
they taking two cpu's (cores) running at 1 Ghz - summing
In message [EMAIL PROTECTED], Tom Lane writes:
Alvaro Herrera [EMAIL PROTECTED] writes:
Using the same page for an updated tuple is generally a useful
optimization, so I don't think you have much hopes for having it
disabled.
Especially not since there's no very reasonable way for anything as
On 10/14/06, Jan Cruz [EMAIL PROTECTED] wrote:
Thank you...I supposed I'll try this one if it could suits my needs.It's really hard to maintain views and functions updates.I have downloaded and read the instruction for pgdiff but I am not familiar with aol_server and it's kinda troublesome for a
Then I go to http://www.postgresql.org/ I get a blank page ?!? No bytes ...
has lost my marbles, my browser (FireFox 1.5.0.7) lost its electrons, or ??
Thanks,
Greg Williamson
DBA
GlobeXplorer LLC
---(end of broadcast)---
TIP 6: explain analyze
Gregory S. Williamson wrote:
Then I go to http://www.postgresql.org/ I get a blank page ?!? No bytes ...
has lost my marbles, my browser (FireFox 1.5.0.7) lost its electrons, or ??
Thanks,
I get stuff now.. maybe you got it in the middle of a reboot or something?
--
Postgresql php
Nope, neither Firefox nor IE 6.0 get anything from this site.
:-(
G
-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Sun 10/15/2006 6:53 PM
To: Gregory S. Williamson
Cc: pgsql-general@postgresql.org
Subject:Re: [GENERAL] postgres' web site
Gregory S. Williamson wrote:
Nope, neither Firefox nor IE 6.0 get anything from this site.
Most bizarre.. it's broken for me now.
I can ping the server but the webserver seems to be broken (I can
telnet to port 80 but can't get a page back).
--
Postgresql php tutorials
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 10/15/06 21:35, Chris wrote:
Gregory S. Williamson wrote:
Nope, neither Firefox nor IE 6.0 get anything from this site.
Most bizarre.. it's broken for me now.
I can ping the server but the webserver seems to be broken (I can
telnet to port
Gregory S. Williamson wrote:
Then I go to http://www.postgresql.org/ I get a blank page
?!? No bytes ... has lost my marbles, my browser (FireFox
1.5.0.7) lost its electrons, or ??
http://www.postgresql.org/download/ works, as does /support, /developer,
etc. but nothing is formatted
Bill Hawes wrote:
Gregory S. Williamson wrote:
Then I go to http://www.postgresql.org/ I get a blank page
?!? No bytes ... has lost my marbles, my browser (FireFox
1.5.0.7) lost its electrons, or ??
http://www.postgresql.org/download/ works, as does /support, /developer,
etc. but
Thanks muchly! Content is back now, formatting is whack, but I can use it
again.
G
-Original Message-
From: Joshua D. Drake [mailto:[EMAIL PROTECTED]
Sent: Sun 10/15/2006 8:27 PM
To: Bill Hawes
Cc: Gregory S. Williamson; pgsql-general@postgresql.org; PostgreSQL WWW
Subject:
Is this new?
Who ever spent the time to do this, thanks for the effort. Having the content
organized this way
makes it easy to find specific reading material.
Regards,
Richard Broersma Jr.
---(end of broadcast)---
TIP 1: if posting/reading
On Sun, Oct 15, 2006 at 11:39:20AM +0200, Peter Eisentraut wrote:
David Fetter wrote:
It would be handy for things like pgpool and Continuent, which
could reliably distinguish up front the difference between a
transaction that can write and one that can safely be sliced up
and dispatched
33 matches
Mail list logo