On 24 Jan 2010, at 5:36, Gauthier, Dave wrote:
Hi:
I’m dealing with a hierarchical design where changes in one record can and
should cause changes in other records lower inthe hierarchy. I’m trying to
use update triggers to do this. And recursion would be a real nice way to
do this.
Hi Everybody.
I have two questions.
1. We have a system that is accessed by Crystal reports which is in turned
controlled by another (3rd party) system. Now, when a report takes too long or
the user cancels it, it doesn't send a cancel request to Postgres. It just
kills the Crystal process
Assuming I have the following table:
CREATE TABLE refers (
idSERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
parent_id INTEGER NOT NULL,
FOREIGN KEY (parent_id) REFERENCES refers(id)
);
I need to insert two records so that select * from refers looks
On Sunday 24. January 2010 14.43.10 Ovid wrote:
Assuming I have the following table:
CREATE TABLE refers (
idSERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
parent_id INTEGER NOT NULL,
FOREIGN KEY (parent_id) REFERENCES refers(id)
);
I need to
On 1/24/10 8:43 AM, Ovid wrote:
Assuming I have the following table:
CREATE TABLE refers (
idSERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
parent_id INTEGER NOT NULL,
FOREIGN KEY (parent_id) REFERENCES refers(id)
);
I need to insert two
Ovid wrote on 24.01.2010 14:43:
Assuming I have the following table:
CREATE TABLE refers (
idSERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
parent_id INTEGER NOT NULL,
FOREIGN KEY (parent_id) REFERENCES refers(id)
);
I need to insert two
Hi,
I'am having trouble using PG_DUMP. The problem is the following, I have made
some minor changes to my database, I have added one table.
I have generated the CREATE statements using a modeling tool, and I have
created another database to test the changes. My problem is the order of the
INSERT
Ovid curtis_ovid_...@yahoo.com wrote:
Assuming I have the following table:
CREATE TABLE refers (
idSERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
parent_id INTEGER NOT NULL,
FOREIGN KEY (parent_id) REFERENCES refers(id)
);
I need to insert
Xi Shen davidshe...@googlemail.com wrote:
To handle that you can set the constzraint deferrable, initially
deferred:
test=# CREATE TABLE refers ( id SERIAL PRIMARY KEY, name VARCHAR(255) NOT
NULL, parent_id INTEGER NOT NULL, FOREIGN KEY (parent_id) REFERENCES
refers(id) deferrable
2009/1/22 Informatica-Cooperativa Cnel. Oviedo informat...@coopovie.com.py:
Buenos Dias todos,
Soy un usuario de postgres de Paraguay, consulto
sobre la posibilidad de inclucion en la futura version la siguiente
sentencia(Uso de alias en la condicion HAVING ):
On Sun, Jan 24, 2010 at 10:36 PM, Andreas Kretschmer
akretsch...@spamfence.net wrote:
Ovid curtis_ovid_...@yahoo.com wrote:
Assuming I have the following table:
CREATE TABLE refers (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
parent_id INTEGER NOT
What is the preferred way to enforce that there is at least one orphan
record if any at all, and that a record is not a Marty McFly type
descendent of itself? I would suggest that a statement level after
trigger is the way to go, but I myself have never actually had to
enforce this.
Regards,
Xi Shen davidshe...@googlemail.com wrote:
what if you insert other values like '1', '999'? will the insertion
successful? if so, what's the difference between a deferred reference
and no reference at all?
Nice question ;-)
Okay, recreate the table but without NOT NULL:
test=# CREATE TABLE
If you do not use null to represent a root node, when you go to unwind the
data from the table to generate a hierarchy tree, you could end up with an
infinite loop. The query will always be looking for the next parent in the
hierarchy. Meaning, you will want to find the parent of a node using the
On Sunday 24. January 2010 16.22.00 Wayne E. Pfeffer wrote:
If you do not use null to represent a root node, when you go to unwind the
data from the table to generate a hierarchy tree, you could end up with an
infinite loop. The query will always be looking for the next parent in the
Thank you Adrian. I apparently missed that post. Guess I will have to come
up with an different approach.
Adrian Klaver adrian.kla...@gmail.com wrote in message
news:201001231002.15874.adrian.kla...@gmail.com...
On Saturday 23 January 2010 6:15:36 am Davor J. wrote:
I am logged in as
Gauthier, Dave wrote:
What I need to know is if, in the “after” update trigger I make the
subsequent updates to other records in the same table, with the OLD/NEW
record ponters be set properly in those subsequent update trigger
invocations?
They'll be set properly. I'm not sure they'll be
Robert Haas robertmh...@gmail.com writes:
2009/1/22 Informatica-Cooperativa Cnel. Oviedo informat...@coopovie.com.py:
SELECT id, sum(salario) as SumaSalario
FROM salarios
GROUP BY id
HAVING SumaSalario500;
I've wished for that syntax once or twice myself, but I'm assuming
Andre Lopes lopes80an...@gmail.com writes:
I have generated the CREATE statements using a modeling tool, and I have
created another database to test the changes. My problem is the order of the
INSERT statements generated by PG_DUMP [-a -d], causing errors because of
the order of the INSERTS.
Ya, I worded the original poorley. Let me try again
The after update trigger on the table sets some of the NEW.column values for
record A. Then it executes another update on the same table, but on record B.
That second execution of the update trigger needs to see the mods made to
record
Hi,
I have tested with pg_dump -u -p 5432 -d -f c:\test.sql mydatabase but
the order of the INSERTS it is not the correct. What PG_DUMP does is to add
the CONSTRAINTS after doing the INSERTS. There is a way to have the correct
order of the INSERTS?
I have tested the COPY but does not insert
All
how to get rid of the postmaster that is still running, but I deleted the
$PGDATA cluster file, so it can not stop it.
but I can not use the port again for new cluster.
PLEASAE HELP.
Amy
I have installed a v8.4 and first port using localhost is ok. but the second
one using different port will get error when connect using IP address.
Is that only one port is allowed for one server ?
please help - need expert's advice.
thanks
Amy
Amy Smith wrote:
I have installed a v8.4 and first port using localhost is ok. but the
second one using different port will get error when connect using IP
address.
Is that only one port is allowed for one server ?
please help - need expert's advice.
you can run different instances of
Gauthier, Dave dave.gauth...@intel.com writes:
Ya, I worded the original poorley. Let me try again
The after update trigger on the table sets some of the NEW.column values for
record A. Then it executes another update on the same table, but on record
B. That second execution of the
From: Alessandro Agosto the.6o...@gmail.com
Date: 2010/1/24
Subject: Re: [GENERAL] [LibPQ] Trying PQconnectStart: it doesn't seem to
connect
To: Craig Ringer cr...@postnewspapers.com.au
Hi, thank you for your reply.
2010/1/24 Craig Ringer cr...@postnewspapers.com.au
What's wrong with psycopg2
Alessandro Agosto wrote:
I'm not yet within select/poll cycle, this is the first call that should
return CONNECTION_OK or CONNECTION_BAD (refering to docs).
That would be the behavior of PQconnectdb(), not PQconnectStart().
Have you read that part of the doc:
quote
Other states might
Greg Smith g...@2ndquadrant.com writes:
Florian Weimer wrote:
The sizes displayed by \dt+ in version 8.4.2 do not take TOAST tables
into account, presumably because the pg_relation_size does not reflect
that, either. I think this is a bit surprising. From a user
perspective, these are part
Tom Lane wrote:
Greg Smith g...@2ndquadrant.com writes:
Florian Weimer wrote:
The sizes displayed by \dt+ in version 8.4.2 do not take TOAST tables
into account, presumably because the pg_relation_size does not reflect
that, either. I think this is a bit surprising. From a user
Hello,
I observed the event that CPU utilization of the process related to postgres
records almost 100% for unknown reason. It would be appreciated if any of you
provide any information on this.
The following line is a part of the result of ps -auxeww.
Hashimoto Yuya wrote:
-Postgres version : PostgreSQL 8.3.3 on i386-portbld-freebsd7.0,
compiled by GCC cc (GCC) 4.2.1 20070719 [FreeBSD]
8.3.3 is fairly old, they are up to 8.3.9 in that version. seee the
release notes for each version from 8.3.4 to 8.3.9 to see what bugs were
fixed...
As title, please help.
I want to setup Postgresql HA by MSCS in VMWARE platform. (win server 2003,
PG 8.3 on 32 bit)
MSCS has been setup, the problem can't start postgresql service.
PGDATA is on the shared disk.
I tried generic service, and application, either one won't bring up
postgresql
Hashimoto Yuya hill_cl...@hotmail.com writes:
[ lots of time spent by stats collector process ]
How large is $PGDATA/global/pgstat.stat ?
If it's very large (many MB), try doing pg_stats_reset(). If that makes
the stats collector CPU usage drop, consider an update to PG 8.4.x,
which is more
8.3.3 is fairly old, they are up to 8.3.9 in that version. seee the
release notes for each version from 8.3.4 to 8.3.9 to see what bugs were
fixed...
http://www.postgresql.org/docs/current/static/release.html
Thanks,
I was planning to update the postgres to the newer version, but I
Thanks,
How large is $PGDATA/global/pgstat.stat ?
Unfortunately, the size of pgstat.stat was not taken when the CPU utilization
of the postgress process reached nearly 100%...
If it's very large (many MB), try doing pg_stats_reset(). If that makes
the stats collector CPU usage
Scenario: You have to update a record. One or more fields are unchanged
from the original record being altered. So you have two options: 1)
Include those fields in your UPDATE statement, even though they are
unchanged; 2) Omit unchanged fields from the UPDATE statement.
My first inclination is to
2010/1/23 Pavel Stehule pavel.steh...@gmail.com:
2010/1/22 Vincenzo Romano vincenzo.rom...@notorand.it:
2010/1/22 Tom Lane t...@sss.pgh.pa.us:
Vincenzo Romano vincenzo.rom...@notorand.it writes:
2010/1/22 Tom Lane t...@sss.pgh.pa.us:
regression=# CREATE FUNCTION q( fmt text, variadic args any
On Monday, January 25, 2010, Steeles stee...@gmail.com wrote:
As title, please help.
I want to setup Postgresql HA by MSCS in VMWARE platform. (win server 2003,
PG 8.3 on 32 bit)
MSCS has been setup, the problem can't start postgresql service.
PGDATA is on the shared disk.
I tried
Paul M Foster wrote:
Scenario: You have to update a record. One or more fields are unchanged
from the original record being altered. So you have two options: 1)
Include those fields in your UPDATE statement, even though they are
unchanged; 2) Omit unchanged fields from the UPDATE statement.
My
2010/1/25 Vincenzo Romano vincenzo.rom...@notorand.it:
2010/1/23 Pavel Stehule pavel.steh...@gmail.com:
2010/1/22 Vincenzo Romano vincenzo.rom...@notorand.it:
2010/1/22 Tom Lane t...@sss.pgh.pa.us:
Vincenzo Romano vincenzo.rom...@notorand.it writes:
2010/1/22 Tom Lane t...@sss.pgh.pa.us:
2010/1/25 Pavel Stehule pavel.steh...@gmail.com:
2010/1/25 Vincenzo Romano vincenzo.rom...@notorand.it:
2010/1/23 Pavel Stehule pavel.steh...@gmail.com:
2010/1/22 Vincenzo Romano vincenzo.rom...@notorand.it:
2010/1/22 Tom Lane t...@sss.pgh.pa.us:
Vincenzo Romano vincenzo.rom...@notorand.it
2010/1/25 Vincenzo Romano vincenzo.rom...@notorand.it:
2010/1/25 Pavel Stehule pavel.steh...@gmail.com:
2010/1/25 Vincenzo Romano vincenzo.rom...@notorand.it:
2010/1/23 Pavel Stehule pavel.steh...@gmail.com:
2010/1/22 Vincenzo Romano vincenzo.rom...@notorand.it:
2010/1/22 Tom Lane
42 matches
Mail list logo