Re: postmaster start options on RedHat 7.1

Lists: pgsql-novice
From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: Rob <rob(at)obsidian(dot)co(dot)za>, <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Triggers
Date: 2002-02-11 16:41:30
Message-ID: web-690471@davinci.ethosmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-novice

Rob,

> I have a trigger on a table called stock_count (which has a column
> barcode) which needs to update a value in a table called
> theoretical_stock_count on either an insert,
> update or delete. However, I need to pass the barcode of the
> inserted/updated/deleted row to the function I am calling. Is there
> any
> way to do this?

Within the Update or Delete trigger, the bar code of the original row
is available as OLD.barcode. For Update and Insert triggers, the new
record's barcode is available as NEW.barcode.

-Josh

______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh(at)agliodbs(dot)com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco


From: "Brian Johnson" <bjohnson(at)jecinc(dot)on(dot)ca>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: postmaster start options on RedHat 7.2
Date: 2002-02-11 17:07:47
Message-ID: 005601c1b31e$a14c2f80$3200a8c0@jecinc.on.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-novice

I would like to add a couple of startup options to postgresql on my system,
but am having difficulty modifying the RedHat startup scripts (in
/etc/rc.d/init.d)

I would like to add -i to allow network connections and -l for ssl traffic

I think the line to modify is:
su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -p
/usr/bin/postmaster start > /dev/null 2>&1" < /dev/null

I tried
su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -p
`/usr/bin/postmaster -i` start > /dev/null 2>&1" < /dev/null
and
su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -p
'/usr/bin/postmaster -i' start > /dev/null 2>&1" < /dev/null
and
su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -p
/usr/bin/postmaster -o "i" start > /dev/null 2>&1" < /dev/null

with no luck

Suggestions?


From: Rob <rob(at)obsidian(dot)co(dot)za>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Triggers
Date: 2002-02-11 19:26:01
Message-ID: Pine.LNX.4.33L2.0202111423330.18933-100000@Genesis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-novice

I have a trigger on a table called stock_count (which has a column
barcode) which needs to update a value in a table called theoretical_stock_count on either an insert,
update or delete. However, I need to pass the barcode of the
inserted/updated/deleted row to the function I am calling. Is there any
way to do this?

Rob

--
He who dies with the most toys ...

... still dies


From: hodges(at)xprt(dot)net
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: postmaster start options on RedHat 7.1
Date: 2002-03-22 04:09:28
Message-ID: 3C9A3DF8.2032.ECC5C1@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-novice

I am trying to get postgresql started by remote login.
Ran this script

#!/bin/sh
exec /bin/su - postgres -c "/usr/bin/postmaster -D
/usr/local/pgsql/data -i -B 4096 >>
/usr/local/pgsql/server.log 2>&1" /dev/null

And get this result:
/usr/bin/postmaster does not find the database system.
Expected to find it in the PGDATA directory
"/usr/local/pgsql/data
", but unable to open file with pathname
"/usr/local/pgsql/data/base/template1/pg_class".

pg_class doesn't seem to be on the box although when I
was
physically present at the computer I think I was able
to
run psql and create a database.

So I guess are there some programs that I can run
remotely (as root or whatever) to get the postgres
files set up?

Thanks, Tom