Forest Wilkinson <[EMAIL PROTECTED]> writes:
> What's going on here? My rule inserted a new row into bar, but the fooid
> it used was not the new value inserted into foo. It looks like my rule is
> inserting "nextval('foo_fooid_seq')" into the bar table, rather than
> inserting the new primar
(Postgres 7.0.3, linux kernel 2.4.2, i386, red hat 7.1)
I'm trying to build rules to automatically populate several tables with
references to any new rows inserted into a primary key table. The primary
key is a sequence. Here's what's going on:
mydb=# create table foo (fooid serial primary
You are probably looking for date_part().
E.g.
SELECT date_part('year',age(birth)),* FROM persons LIMIT 1;
Troy
>
> I have a table containing the birthdays of various persons. The target
> is to compute the age of a persons.
>
> persons=# SELECT age(birth), * FROM persons LIMIT 1;
>
Florian Weimer <[EMAIL PROTECTED]> writes:
> Is it likely that table inheritance is going to be removed in future
> PostgreSQL versions (or that the semantics change radically)?
I doubt anyone is planning to remove it. If anything it'll get better
supported. Notice that 7.1 now allows update/de
I have a table containing the birthdays of various persons. The target
is to compute the age of a persons.
persons=# SELECT age(birth), * FROM persons LIMIT 1;
age | id | name | birth| gender |
income
---++++--
Tom Lane wrote:
> "postgresql" <[EMAIL PROTECTED]> writes:
> > I guess the subject line says ithas anyone tried running
> > PostgreSQL in MAC OS X.
>
> Some folks at Apple did.
>
> Postgres 7.1 is alleged to build out-of-the-box on OSX.
> (But I haven't tried it myself.) Don't bother trying
hello!
i have the following function:
CREATE FUNCTION plusSum(text,int4) RETURNS int4 AS '
DECLARE
jrlname ALIAS FOR $1;
sumup ALIAS FOR $2;
actsum int4;
arow RECORD;
conversion float8;
temp float8;
sum float8;
BEGIN
sum := 0;
RAISE NOTICE ''stats % '', sumup;
FOR arow IN
It didn't work. I checked the tables (both) and found nothing wrong.
Finally I received an e-mail from Tom Lane suggesting that I upgraded to
Postgres 7.1, wich I did. After the upgrade, everything worked just fine.
Thank you.
Ligia
"Martín Marqués" <[EMAIL PROTECTED]> wrote in message
news:[EMAI
Hello,
I would like to setup a trigger to keep track of all changes done
onto the records of paticular tables. Basically, there would be two
identical tables such as, 'medications' and 'medications_log', when a
user inserts, updates or deletes a record I would like a copy to be
inserted into
Olivier PRENANT wrote:
>
> Sorry to bother,
>
> Just making sure my newsfeed works
>
>
Its seems to work :-)
nils
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAI
Hi,
PostgreSQL 7.1.x does work on MacOS X, there's evan a MacOS X
installation guide at :
http://techdocs.postgresql.org/installguides.php#macosx
Hope that's helpful. It's mainly focused on Apache + PHP + PostgreSQL
7.1 on MacOS X, although you should be able to make use of it.
If you need fu
Is it likely that table inheritance is going to be removed in future
PostgreSQL versions (or that the semantics change radically)? Or can
I built a database on top of this feature without running the risk of
a major restructuring task in the next few years?
--
Florian Weimer
12 matches
Mail list logo