How does one raise an exception from a PL/Perl function? Specifically,
this is a trigger function. Is it as simple as "die "?
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
Al_Dev wrote:
> World-wide Stop Order on PERL,Python,Java::->> Use Ruby instead
> Al Dev
> alavoor[at]-no-spam(dot)yahoo(dot)com
There's irony for you.
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
Why yes, I am tired of spam. Thank you for asking!
I'm trying to write a general-purpose trigger that will disallow updates
on certain fields (I could probably do this in other ways, but I have a
stubborn streak ...).
Given a table, I want to define a trigger on that table that will
"write-protect" one column by name:
CREATE TRIGGER tbl_nomod_cre
Jeff Boes wrote:
What I'm really hoping for is a way to get the "start time" for a query
in pg_stat_activity.
... which I guess is pg_stat_activity.query_start. Duh. I will now hide
under my desk for a while.
(Don't know how I missed this; maybe I was looking at old do
nd elapsed time.
What I'm really hoping for is a way to get the "start time" for a query
in pg_stat_activity.
I'm using 7.4.1, by the way.
--
Jeff Boes Vox 269-226-9550 x24
Director of Software Development
Tom Lane wrote:
Jeff Boes <[EMAIL PROTECTED]> writes:
Tom Lane wrote:
No kidding. A rule is a macro and therefore has the usual risks of
multiple evaluations of arguments.
But shouldn't "new.job_id" use the value that was already recorded in
the original
Tom Lane wrote:
Jeff Boes <[EMAIL PROTECTED]> writes:
It appears that the rule is inserting the row copies into
job_queue_trace with a job_id value that is one higher than the job_id
from the original row. Almost as though it was re-evaluating the
sequence ...
No kidding. A rul
(I thought I posted this yesterday from Google Groups, but it doesn't
appear to have "taken".)
I'm having a problem with a rule designed to log new rows inserted into
one table. The base table is very volatile; rows are inserted from
various places, including both application code and triggers.
Google Mike wrote:
I guess it would be great if Pgsql had a way to find a database
definition via a system stored procedure like other database platforms
have.
There are a few:
nexcerpt=# \df pg_get*def
List of functions
Result data type | Schema | Name
IF curr_grp IS NULL
THEN
curr_grp = t.the_group;
ELSIF curr_grp != t.the_group
THEN
curr_grp = t.the_group;
rank = 1;
END IF;
r.rank_of = rank;
r.the_value = t.the_value;
RETUR
y field1') order by rank_of;
which will give you the rank number and original value of each row.
The second function is more interesting, because that's where you get
the ability to do "top N by X" kinds of queries. For instance,
select field1, field2, field3 fro
Stephan Szabo wrote:
On Thu, 3 Jun 2004, Jeff Boes wrote:
(asked last week on .questions, no response)
Can anyone explain why this happens? (under 7.4.1)
select '2004-05-27 09:00:00.51-04' :: timestamp(0) ;
timestamp
-
2004-05-27 09:00:01
ow much beer would we have
to provide to get you to talk? 8-)
--
Jeff Boes vox 269.226.9550 ext 24
Database Engineer fax 269.349.9076
Nexcerpt, Inc. http://www.nexcerpt.com
t the end of the day. Overnight, we ran a few
HUNDRED THOUSAND queries against a large table using no index ...
--
Jeff Boes vox 269.226.9550 ext 24
Database Engineer fax 269.349.9076
Nexcerpt, Inc.
Bruno Wolff III wrote:
On Fri, Oct 10, 2003 at 11:27:50 -0400,
Jeff Boes <[EMAIL PROTECTED]> wrote:
Yes, the table has:
Table "public.link_checksums"
Column | Type | Modifiers
-+---+---
md5 | character(32) | not null
link_id | int
http://www.ucomics.com/foxtrot/2003/09/14/
--
Jeff Boes vox 269.226.9550 ext 24
Database Engineer fax 269.349.9076
Nexcerpt, Inc. http://www.nexcerpt.com
...Nexcerpt... Extend your
>= 0
and t.oid = a.atttypid
order by 1
This is happening inside DBD::Pg, the "table_attributes" method. The
relname being selected is NOT a temp table. We do make extensive use of
temp tables in the code, however.
--
Jeff Boes
there, I can't keep them straight ... 8-}
I'd turn on query logging, but since we're getting these about every 3-7
days, I'm not sure that would be the most effective use of all that disk
... maybe I can find a way to localize it to the point where the
31072
max_fsm_pages = 35
max_fsm_relations = 200
wal_buffers = 32
sort_mem = 65536
vacuum_mem = 65536
effective_cache_size = 196608
--
Jeff Boes vox 269.226.9550 ext 24
Database Engineer fax 269.349.9076
Nexcerpt
Is there an equivalent to '\i' that will load up the query buffer but not
run the query?
(I have a query stored in a file that I want to modify on the fly, but
not overwrite the query file.)
--
Jeff Boes vox 616.226.9550
Databas
NSERT INTO keywords (key_text) VALUES ('foo');
It's been a while, but I'm pretty sure Oracle will do the same thing for
each of these inserts, namely apply a default value when a null is
detected.
But thanks for the help!
--
Jeff Boes
n tried creating a view on keywords that has only keyword_text, and
copying into THAT--no luck. Then I wrote a rule to replace inserts on the
view with inserts on the table, but apparently COPY doesn't trigger INSERT
rules. Grumble...
--
Jeff Boes
Hello, I'm fairly new to PostgreSQL. Does anyone have a resource for setting
up plperl from scratch? The online documentation doesn't offer much help.
--
Jeff Boes vox 616.226.9550
Database Engineer fax 61
r table 'dogs'
NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY
check(s)
CREATE
Why is Postgresql creating a unique index for 'dogs_owner_id_key'? I don't want that
column to be unique!
--
Jeff Boes
24 matches
Mail list logo