w which sql comes from which connection.
Regards,
A.Bhuvaneswaran
signature.asc
Description: This is a digitally signed message part
> I am having an RH Linux 7.3 box which is already running an Postgres
> 7.3.4 server. I want to install Postgres 7.4 on the same machine. Is
> it possible to install different versions of Postgres in a single RH
> Linux 7.3 box and the postmaster up and running for both (7.3.4 & 7.4
> database ser
> I am new of postgre sql.im using cursors in pgsql and
> getting tuples successfully returns in c++, but how
> can i raise exception in the stored function?.pl
> anyone help me.
You can use 'raise exception' for this purpose. Refer this link for
details:
http://www.postgresql.org/docs/current/int
> I would like to upgrade it to the newest version of postgres.
> 1) Is there a version for redhat 7.3.
Yes. You can run postgresql 7.2.x, 7.3.x & 7.4 on redhat 7.3.
> 2) How stable is postgres 7.4 ?
7.4 is stable. If i am in your position, i would rather wait for 7.4.3
or 7.4.4 for that matter.
> Why dont you try to write your trigger in C?
Hi, one cannot write triggered procedures in C. Currently, it can only be
written in plpsgql.
> > CREATE FUNCTION "public"."check_shipment" () RETURNS trigger AS'
> > begin
> > If new.shipment_type_id = 4 then
> > --do something
> > e
> 1. put create database, create tables sql statements in a file and
> execute through prompt
> 2. insert or update data that is put in a file
Place your commands in a file & execute them either from the prompt or
from psql. Remember to create your file in the below order:
1) create database
2) c
> Will the postgres create individual data file for databases?
Yes.
> How to get the datafile path of a database?
/var/lib/pgsql/data/base/, database directory name = pg_database.oid. You
can also use oid2name contrib module for finer detail.
regards,
bhuvaneswaran
---
> Is there a way to automate the backup databases using pg_dump (like in
> SQL server)?
You can use cron to automate your backup process with pg_dump.
regards,
bhuvaneswaran
---(end of broadcast)---
TIP 8: explain analyze is your friend
> Suppose, one server/postmaster is running several databases. Is there
> something like "SET database TO whatever" (and I mean *database* not
> schema). I need this to ensure that a script runs only against db for
> which it was desinged.
You can use PG* environment variables if you wish to write
> I want to change a field of a record after the modification of another
> field of the same record or during an insert of a new record.
You can easily accomplish this in a BEFORE trigger. It is applicable for
both insert & update.
regards,
bhuvaneswaran
---(end of bro
> Anyway, you'll need to write your own replace() if you stick with that
> release.
>
You can use this replace function, if you stick with that release.
regards,
bhuvaneswaran
create or replace function replace (varchar, varchar, varchar) returns varchar as '
declare
string alias for
> DELETE FROM foo WHERE (col1, col2) IN (SELECT...)
DELETE FROM foo WHERE col1 = sub_select_table.col1 and col2 =
sub_select_table.col2;
regards,
bhuvaneswaran
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
> Nevermind- that doesn't work either! Here's the new sample code:
Rules are triggered before the event. You must do it in AFTER trigger.
regards,
bhuvaneswaran
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
> I'd like to make a script to automatically vacuum all my DBs nightly. And
> I'd like to skip system tables, starting with pg_*.
If you run the process as non-super user, it must skip your system tables.
On the other hand, if you run it as a super user, it must be done table
wise from your scr
14 matches
Mail list logo