Hi,
I'm not sure to well understand your problem.
But, Ora2pg need 3 modules :
- Two of them : DBI-1.38 and DBD-Pg-1.22 have to be comile and install
from your Postgres environnement. For example /home/postgres.
- And DBD-Oracle-1.14 has to be compile and install in your Local Oracle
environment
is it possible to add column to database, that will automatically contain date+time
(or likely Unix timestamp) when the row was touched/changed - ie by INSERT or UPDATE ?
---(end of broadcast)---
TIP 2: you can get off all lists at once with the un
On Jan 23, 2004, at 1:11, NTPT wrote:
is it possible to add column to database, that will automatically
contain date+time (or likely Unix timestamp) when the row was
touched/changed - ie by INSERT or UPDATE ?
Yes, a very simple trigger can do this.
--
SPY My girlfriend as
NTPT wrote:
is it possible to add column to database,
ALTER TABLE foo
ADD COLUMN mod_date TIMESTAMP;
that will automatically contain date+time (or likely Unix timestamp) when the row was touched/changed - ie by INSERT or UPDATE ?
CREATE FUNCTION touch() RETURNS trigger AS '
begin
NEW.mod_dat
Mike Mascari wrote:
CREATE FUNCTION touch() RETURNS trigger AS '
begin
NEW.mod_date = LOCALTIMESTAMP;
return NEW;
end;
' language 'plpgsql';
CREATE TRIGGER t_foo
BEFORE INSERT OR UPDATE ON foo
FOR EACH ROW
EXECUTE PROCEDURE touch();
If you want timezone information, use TIMESTAMP WITH TIME ZONE an
A few question regarding PostgreSQL handling of queries:
- Is each query submitted parsed and planned even if it is identical to a
query submitted before?
For example, 10 queries "select * from animals where id=:b1" with possibly
different bind variable :b1 values will be fully processed (parsed
I must have a fundamental misunderstanding about using schema.
Before using schema, I usually have a file that has my database
definition, and I can play that file back in to a new database to
create a testing area or to create my production setup.
I think I want to use schema the same way.
My pr
> > is it possible to add column to database, that will automatically
> > contain date+time (or likely Unix timestamp) when the row was
> > touched/changed - ie by INSERT or UPDATE ?
> Yes, a very simple trigger can do this.
Wouldn't just setting the default value of the field to be NOW() accom