On Fri, 28 Jul 2000, André Næss wrote:
> Thanks for all the help so far. What I now have is the following structure:
>
> create table b_news (
> id serial primary key,
> title varchar(60),
> time timestamp
> );
>
> create table b_news_unpublished (
> news_id int references news on delete
On Fri, 28 Jul 2000, Carolyn Lu Wong wrote:
> Does postgreSQL support nested transactions?
>
no.
On Fri, Jul 28, 2000 at 04:54:58PM -0400, Web Manager wrote:
> Hello,
>
> here is to table:
>Table "city"
>Attribute|Type | Modifier
> +-+-
> city_id|
Hello,
here is to table:
Table "city"
Attribute|Type | Modifier
+-+-
city_id| smallint| not null default
nextval('seq_city'::text)
region_id |
I'm kind of new to pgsql, but as long as MAX works for boolean fields, they
you can just change the first query below with:
HAVING MAX(active) != 't'
but it seems that pgsql can have user defined aggregates, so you could
define a function that computes the MAX of a boolean and define true to be
"=?iso-8859-1?B?QW5kcukgTuZzcw==?=" <[EMAIL PROTECTED]> writes:
> Secondly, I miss one final idea, when a delete is performed on the
> b_news_unpublished table, I would like to set up a rule or procedure that
> sets the time value to null in b_news for each row that is affected by the
> delete. I
Thanks for all the help so far. What I now have is the following structure:
create table b_news (
id serial primary key,
title varchar(60),
time timestamp
);
create table b_news_unpublished (
news_id int references news on delete cascade
);
CREATE FUNCTION b_news_trigproc() RETURNS OPAQ
> > CREATE RULE newsrule AS ON INSERT TO news
> > WHERE new.publishtime NOTNULL DO
> > INSERT INTO news_unpublished VALUES (new.id);
>
> The following happens:
> rules=# insert into news (title, time) values('Hei', now());
> ERROR: referential integrity violation
- Original Message -
From: "Bernie Huang" <[EMAIL PROTECTED]>
> Hi, everyone,
>
> Browsing through the online manual, I didn't find anything related to
> BLOBs, but I know there must be BLOBs since many people are asking about
> it on the list and there is a pg_fetch_object() in PHP for
- Original Message -
> No. The rule
>
> CREATE RULE newsrule AS ON INSERT TO news
> WHERE new.publishtime NOTNULL DO
> INSERT INTO news_unpublished VALUES (new.id);
>
> should do the job perfectly. Maybe you want to have the
> following rul
Does postgreSQL support nested transactions?
11 matches
Mail list logo