A trigger did work, thank you for that suggestion.
In a race situation, there really is no manual solution either
I sent in a bug report for the rule problem that I experienced.
Sim
Tom Lane wrote:
Martijn van Oosterhout writes:
I don't think rules can do what you want.
A trigger might work
On Tue, Mar 13, 2007 at 11:23:03PM -0400, Jasbinder Singh Bali wrote:
> I have a stored procedure written in plperl.
> This procedure has series of inserts at various levels. A few inserts on
> certain tables invoke triggers
> that launch tools outside the domain of the database.
>
> How can I mak
Thanks Stuart.
I somehow overlooked it all the time. In the end I ran updatedb and locate :-)
Guess it's time to get some sleep.
Uwe
On Tuesday 13 March 2007 22:40, Stuart Cooper wrote:
> > this may be a very stupid question. I've always used the source rpms for
> > new versions. However now I'm
this may be a very stupid question. I've always used the source rpms for new
versions. However now I'm faced with a ubuntu server and I never used a
non-rpm system.
Since there is no up-to-date postgresql package I grabbed the source for 8.1.8
and compiled/installed it.
So far so good. Now I'm loo
Never mind.
Dumb me.
Uwe
On Tuesday 13 March 2007 22:17, Uwe C. Schroeder wrote:
> Hi everyone,
>
> this may be a very stupid question. I've always used the source rpms for
> new versions. However now I'm faced with a ubuntu server and I never used a
> non-rpm system.
> Since there is no up-to-d
Hi everyone,
this may be a very stupid question. I've always used the source rpms for new
versions. However now I'm faced with a ubuntu server and I never used a
non-rpm system.
Since there is no up-to-date postgresql package I grabbed the source for 8.1.8
and compiled/installed it.
So far so
Stuart,
Thanks for the reply.
You are dead right, and as expected the problem is not with psql.
> $ psql -H -P tableattr='width="80%" bgcolor="#FF"'
>
> works for me. Carefully study my nice simple quoting: single quotes ''
> around the whole
> tableattr='THING' shebang and non-escaped dou
Hi Allan,
TABLEOPTIONS="-P border=5 -P tableattr=width=\"80%\" -P
tableattr=bgcolor=\"#FF\""
produces
...
...
Seems to hang on to the last.
Yes- you've said -P tableattr twice so the second one overrides the first one.
$ psql -H -P tableattr='width="80%" bgcolor="#FF"'
wor
Hi all,
Trying to get psql to produce multiple table attributes in the tag when
psql is used with the -H switch.
eg
TABLEOPTIONS="-P border=5 -P tableattr=width=\"80%\""
psql $DATABASEHOST -U $DATABASEUSER -d $DATABASE -q -P footer -P title=Summary
-H $TABLEOPTIONS
produces
...
...
As expe
Hi,
I have a stored procedure written in plperl.
This procedure has series of inserts at various levels. A few inserts on
certain tables invoke triggers
that launch tools outside the domain of the database.
How can I make everything as one single transaction and simply roll back
everything whene
On Fri, 2007-03-09 at 19:40 -0800, omar wrote:
> below.) This behavior is a feature, not a bug. A database is suppose to
> store and retrieve data and it should not matter to the database what
> format that data is in. The strong typing system found in most other SQL
In my opinion, this is the
Reece Hart wrote:
> On Tue, 2007-03-13 at 18:16 -0400, Alvaro Herrera wrote:
>
>> On the other hand it would be scary to have the elevator "change its
>> mind" on the middle of carrying you to 20th and suddenly opening the
>> floor for dumping you to the basement instead. Which one would think
>>
On Tue, 2007-03-13 at 18:16 -0400, Alvaro Herrera wrote:
> On the other hand it would be scary to have the elevator "change its
> mind" on the middle of carrying you to 20th and suddenly opening the
> floor for dumping you to the basement instead. Which one would think
> is
> pretty much what mus
# [EMAIL PROTECTED] / 2007-03-13 18:29:36 +0100:
> Hi,
>
> I have a stored procedure which returns a SETOF RECORD.
> so basically a partial rowtype from a table.
>
> to execute the query in PHP, i must write :
> select * from myschema.sp_a_002('username') as result(Column1 varchar);
>
> to get t
Reece Hart wrote:
> On Tue, 2007-03-13 at 17:44 -0400, Tom Lane wrote:
>
> > are you in the habit of
> > banging on ^C repeatedly? I couldn't reproduce such a problem in a
> > small amount of testing though.
>
> You mean C-c doesn't work like elevator buttons?
No, it's much better because you
Tom Lane wrote:
BTW, you said you were on FC6, but what kernel version exactly?
(uname -a is good)
[EMAIL PROTECTED] > uname -a
Linux bilbo.localdomain 2.6.19-1.2911.6.5.fc6 #1 SMP Sun Mar 4 16:05:34
EST 2007 x86_64 x86_64 x86_64 GNU/Linux
[EMAIL PROTECTED] > cat /proc/cpuinfo
processor
On Tue, 2007-03-13 at 17:44 -0400, Tom Lane wrote:
> are you in the habit of
> banging on ^C repeatedly? I couldn't reproduce such a problem in a
> small amount of testing though.
You mean C-c doesn't work like elevator buttons?
It wouldn't surprise me that I hit repeatedly. I certainly reme
On Tuesday 13 March 2007 14:23, "Dhaval Shah" <[EMAIL PROTECTED]>
wrote:
> On the reverse, can I indicate to a db in recovery mode to start
> consuming WAL Files from a particular number?
>
The recovery process is documented at
http://www.postgresql.org/docs/8.2/interactive/continuous-archiving.
Reece Hart <[EMAIL PROTECTED]> writes:
> The manual clearly says that a each row in pg_database will have a
> corresponding subdirectory in base/. Is the converse also true, ie,
> should every subdir in base/ also have a row in pg_database? If so, am
> I safe to rm the unreferenced subdirectories
"Thomas F. O'Connell" <[EMAIL PROTECTED]> writes:
> I'm curious. For 7.4.x, does the database require a restart for the
> change to take effect? I'm aware of a few production installations
> where the OS changed, but postgres time functions didn't take hold.
Yes, probably. On those systems yo
BTW, you said you were on FC6, but what kernel version exactly?
(uname -a is good)
regards, tom lane
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if
If I put a postgres 8.2 in an archive mode, it starts logging the WAL
files. The db starts the WAL File from 1001.gz and continually
increments the number.
Is there a control on 8.2 where I can indicate the number of the WAL
file to start from?
On the reverse, can I indicate to a db in r
Jon Lapham <[EMAIL PROTECTED]> writes:
> Tom Lane wrote:
>> Just for completeness, could we see the output of "ipcs -a" now?
> [EMAIL PROTECTED] ~]# ipcs -a
Thanks. The postgres segment looks pretty standard here. I'm a bit
curious what all the lapham-owned destroyed segments are --- any idea?
A
Tom Lane wrote:
Jon Lapham <[EMAIL PROTECTED]> writes:
Tom Lane wrote:
It would seem that maybe your kernel has a different idea of what EIDRM
means than we do. You say this persists across a reboot?
I probably should have asked before doing this... but I just rebooted
and postgresql came u
Jon Lapham <[EMAIL PROTECTED]> writes:
> Tom Lane wrote:
>> It would seem that maybe your kernel has a different idea of what EIDRM
>> means than we do. You say this persists across a reboot?
> I probably should have asked before doing this... but I just rebooted
> and postgresql came up fine.
Tom Lane wrote:
Oh, that's interesting. The code is barfing on this because
/*
* Otherwise, we had better assume that the segment is in use. The
* only likely case is EIDRM, which implies that the segment has been
* IPC_RMID'd but there are still processes att
Jon Lapham <[EMAIL PROTECTED]> writes:
> chdir("/var/lib/pgsql/data")= 0
> open("postmaster.pid", O_RDWR|O_CREAT|O_EXCL, 0600) = -1 EEXIST (File
> exists)
> open("postmaster.pid", O_RDONLY)= 3
> read(3, "2809\n/var/lib/pgsql/data\n 54320"..., 1123) = 45
> close(3)
Tom Lane wrote:
Jon Lapham <[EMAIL PROTECTED]> writes:
Tom Lane wrote:
Let's see the output from
sudo ipcs -a
[EMAIL PROTECTED] ~]# ipcs -a
[ no postgres-owned segments... ]
Well, that's dang interesting. Could you run the postmaster under
strace and send the output?
Let me know if thi
Jon Lapham <[EMAIL PROTECTED]> writes:
> Tom Lane wrote:
>> Let's see the output from
>> sudo ipcs -a
> [EMAIL PROTECTED] ~]# ipcs -a
[ no postgres-owned segments... ]
Well, that's dang interesting. Could you run the postmaster under
strace and send the output?
regards,
Tom Lane wrote:
Jon Lapham <[EMAIL PROTECTED]> writes:
What can I do to help diagnose what is happening?
Let's see the output from
ps auxww | grep postgres
sudo ipcs -a
[EMAIL PROTECTED] ~]# ps auxww | grep postgres
root 3969 0.0 0.0 60272 688 pts/1R+ 15:47 0:00 grep
postg
Jon Lapham <[EMAIL PROTECTED]> writes:
> What can I do to help diagnose what is happening?
Let's see the output from
ps auxww | grep postgres
sudo ipcs -a
(or local equivalents)
regards, tom lane
---(end of broadcast)---
TI
Today I had a power outage which upon reboot seems to have done
something to cause Postgresql to not restart properly. This has
happened to me before:
http://archives.postgresql.org/pgsql-general/2006-09/msg00938.php
...and during this previous discussion, Tom Lane pointed out that I may
have
On 3/13/07, Alain Roger <[EMAIL PROTECTED]> wrote:
Hi,
I have a stored procedure which returns a SETOF RECORD.
so basically a partial rowtype from a table.
to execute the query in PHP, i must write :
select * from myschema.sp_a_002('username') as result(Column1 varchar);
to get the result.
H
On Jan 23, 1:18 am, [EMAIL PROTECTED] (Tom Lane) wrote:
> Adam Gordon <[EMAIL PROTECTED]> writes:
> > Anyone know where to find info about whether or not the new
USDSTrules
> > impact certain versions of Postgres and what needs to be done to
ensure
> > observance of the new rules? Thanks.
>
Hi,
I have a stored procedure which returns a SETOF RECORD.
so basically a partial rowtype from a table.
to execute the query in PHP, i must write :
select * from myschema.sp_a_002('username') as result(Column1 varchar);
to get the result.
However, is there another to get the result without us
setup: postgresql 8.1.8, x86_64, gnu/linux
I recently used createdb -T to copy a large database and the process
failed due to disk full, but the space wasn't freed after that failure.
That led me to wonder how much of my disk usage was from failed or
interrupted operations.
In the 8.1.8 manual, C
"Olivier Ceulemans" <[EMAIL PROTECTED]> writes:
> I'm running 'PostgreSQL 8.2.0 on i686pc-mingw32, compiled by GCC gcc.exe
> (GCC) 3.4.2 (mingw-special)'.
BTW: you oughta think about an update to 8.2.3; we've fixed several nasty
bugs, most especially in the windows port.
> Transaction B is simply
Ezequias Rodrigues da Rocha wrote:
Hi list,
I would like to know if I set the debug mode to 2 (-l 2) in the pgAgent
connection string it could spend much cpu processing.
I have other things running in the server and I don't like to create
problem to others.
Please stop cross posting to lot
I'm running 'PostgreSQL 8.2.0 on i686pc-mingw32, compiled by GCC gcc.exe
(GCC) 3.4.2 (mingw-special)'.
My intuition about the lock acquired foreign keys seems right.
Here is a short description: (if it can help someone else one day...)
create table y
{
y_id bigint not null,
y_coun
Hi list,
I would like to know if I set the debug mode to 2 (-l 2) in the pgAgent
connection string it could spend much cpu processing.
I have other things running in the server and I don't like to create problem
to others.
--
Ezequias Rodrigues da Rocha
http://ezequiasrocha.blogspot.com/
use Mo
Thanks!
With RAISE NOTICE "terse" mode works great, CONTEXT is not shown.
But does "terse" also disable CONTEXT displaying on fatal errors inside a
stored function? If it does, it is not so useful as it could be, because I
don't think that fatal error context hiding is a good idea... No
document
Joost Kraaijeveld wrote:
Hi all,
Thanks for looking into it. The problem is solved: on both machines
there appeared to be a hung-up backup process that locked PostgreSQL.
If that's a file-level backup, you'll want to exclude the PG directories
(or stop the database while the backup occurs).
Hi all,
Thanks for looking into it. The problem is solved: on both machines
there appeared to be a hung-up backup process that locked PostgreSQL.
--
Groeten,
Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl
---
"Dmitry Koterov" <[EMAIL PROTECTED]> writes:
> Is there any way to disable CONTEXT displaying with still enabled NOTICEs
> text?
You could do "\set VERBOSITY terse"
regards, tom lane
---(end of broadcast)---
TIP 6: explain a
"Olivier Ceulemans" <[EMAIL PROTECTED]> writes:
> I wrote an application making 'advanced' use of transactions. The
> application is not tied to a specific kind of database. It runs fine on
> oracle, db2, sql server but I run into a deadlock on postgresql.
> ...
> For transaction A, I have a RowSha
Hello.
With debug purposes I use RAISE NOTICE ... inside my stored
functions/triggers. But there is a little problem: if I run this
function/trigger inside psql command-line client (e.g.), it shows not only a
notice text, but also a caller context (started with "CONTEXT" substring)
which looks qu
Hi All,
I wrote an application making 'advanced' use of transactions. The
application is not tied to a specific kind of database. It runs fine on
oracle, db2, sql server but I run into a deadlock on postgresql.
I have two transactions (let's say A & B). These two transactions are
initiated by t
On Mon, 2007-03-12 at 23:46, Tom Lane wrote:
> "Tadej Kanizar" <[EMAIL PROTECTED]> writes:
> > http://devloop.org.uk/documentation/database-performance/
> > Any comments?
>
> Old news, see this thread:
> http://archives.postgresql.org/pgsql-general/2007-02/msg00806.php
>
> Most of us stopped read
Martijn van Oosterhout writes:
> I don't think rules can do what you want.
A trigger might work, ignoring the problem of race conditions between
two inserts happening concurrently (which a rule can't handle either).
regards, tom lane
---(end of br
I misunderstood you.
What you are saying is that since the insert is done first and then the update when it gets to the
update it checks the rule and even though it wasn't valid when the statement was executed, it is
valid at the time of execution and therefore it runs.
I have tried another te
hi.
Rick Schumeyer wrote:
[...]
From a business rules perspective:
Some users are not employees (like an admin user)
Some employees are not users
[...]
from my view users and employees have something in common: they are persons.
why don't create a person-table with the attributes the grou
On Sat, 2007-03-10 at 08:07 -0300, Jorge Godoy wrote:
> omar <[EMAIL PROTECTED]> writes:
>
> > I'm curious what people think about the following statement considering the
> > database typing talk being brought up here. My experience is that more
> > times
> > than not I have to put data validati
I would think the rule qualification would tell the system not to run the rule in the event that it
does not meet the qualification. According to the docs:
What is a rule qualification? It is a restriction that tells when the actions of the rule
should be done and when not. This qualification
On Mar 12, 2007, at 10:57 PM, Tom Lane wrote:
Alvaro Herrera <[EMAIL PROTECTED]> writes:
Tom Lane wrote:
One of the reasons you don't see that is that a large fraction of
the
writes are triggered in background by the "bgwriter" process, which
operates at too low a level to participate in th
On Tue, Mar 13, 2007 at 02:15:01PM +0200, Sim Zacks wrote:
> select version()
> "PostgreSQL 8.0.1 on i686-pc-linux-gnu, compiled by GCC
> i686-pc-linux-gnu-gcc (GCC) 3.3.5 (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3,
> pie-8.7.7.1)"
>
> I am sure that I must have missed something here because I read th
select version()
"PostgreSQL 8.0.1 on i686-pc-linux-gnu, compiled by GCC i686-pc-linux-gnu-gcc (GCC) 3.3.5 (Gentoo
Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1)"
I am sure that I must have missed something here because I read the documentation and searched the
forums and it all seems fairly strai
On 13/03/07, Merlin Moncure <[EMAIL PROTECTED]> wrote:
On 3/12/07, Guillaume Bog <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> I'm now used to using psql to manage my databases into a terminal, and
> I found the very convenient "\g |" command that pipes query result in
> any shell tool I want. Bu
Thanks a lot! All works!
So - I propose to change error message from
ERROR: database "xxx" is being accessed by other users
to
ERROR: database "xxx" is being accessed by other users or there are
prepared transactions exist (please use "SELECT * FROM pg_prepared_xacts"
and "ROLLBACK PREPARED
On Tue, Mar 13, 2007 at 11:41:46AM +0300, Dmitry Koterov wrote:
> Yes, I have one!
> How to remove it now? I tried DEALLOCATE for gid returned by
>
> select * from pg_prepared_xacts;
>
> but it says "prepared statement does not exist"...
DEALLOCATE is for prepared *statements*; you have a prepar
Dmitry Koterov wrote:
>> Have you checked for prepared transactions in that DB? See
>> pg_prepared_xacts view (I've been burnt by that myself...)
>
> Yes, I have one!
> How to remove it now? I tried DEALLOCATE for gid returned by
>
> select * from pg_prepared_xacts;
>
> but it says "prepared s
Yes, I have one!
How to remove it now? I tried DEALLOCATE for gid returned by
select * from pg_prepared_xacts;
but it says "prepared statement does not exist"...
Database restart does not reset the prepared transaction...
On 3/13/07, Tom Lane <[EMAIL PROTECTED]> wrote:
"Dmitry Koterov" <[EMA
"Dmitry Koterov" <[EMAIL PROTECTED]> writes:
> I have a database which I cannot delete (the same for rename):
> ERROR: database "xxx" is being accessed by other users
> But it is NOT accessed by anybody, because:
Have you checked for prepared transactions in that DB? See
pg_prepared_xacts view (
62 matches
Mail list logo