Create a different trigger function for each table, then each trigger can
be customized to know the column names.
You can generate the triggers from a little script which queries the
system tables to get at the column names. It would spit code like 'IF
NEW.fieldname != OLD.fieldname THEN (
On Sat, 2004-10-23 at 22:22, Karim Nassar wrote:
> If you just need a working copy, not necessarily right up to date at any
> > time, you can just dump and restore it:
> >
> > pg_dumpall -h source_server |psql -h dest_server
> >
> > add switches as necessary.
>
> That would be great for the firs
On Sat, Oct 23, 2004 at 23:51:20 -0500,
Bruno Wolff III <[EMAIL PROTECTED]> wrote:
> One value I found for a solar year is 365 days, 5 hours, 48 minutes, 45.51
> seconds.
Wikipedia gives 365.242189670 days (86400 seconds) as the length of the
mean solar year in 2000. To give you some idea of how
On Thu, Oct 21, 2004 at 09:26:30AM +0300, Katsaros Kwn/nos wrote:
>
> I want to make use of some contrib/dblink functions inside my user
> defined functions, e.g. I would like to be able to call dblink_record()
> from my user defined code in this way:
>
> dblink_record("param1","param2");
>
> I
On Sat, Oct 23, 2004 at 23:15:57 -0500,
Bruno Wolff III <[EMAIL PROTECTED]> wrote:
> by comparing say m1 and m2. This will work as long as f(m,s1) = f(m,s2)
> implies s1 = s2. It will probably be desirable to use a subset of these
> mappings where f(m,s) = g(m) + h(s). In fact the current system
On Sat, Oct 23, 2004 at 23:36:05 -0400,
Tom Lane <[EMAIL PROTECTED]> wrote:
>
> We don't have to have this particular sorting decision, we just have
> to have *some* unique sorting order. In particular, if we want to say
> that two interval values are not equal, we have to be able to say which
Bruno Wolff III <[EMAIL PROTECTED]> writes:
> Tom Lane <[EMAIL PROTECTED]> wrote:
>> Anybody have any thoughts about a better way to map the multicomponent
>> reality into a one-dimensional sorting order?
> You could return NULL for cases where the number of months in the
> first interval is les
On Sat, Oct 23, 2004 at 21:38:15 -0400,
Tom Lane <[EMAIL PROTECTED]> wrote:
> Doug McNaught <[EMAIL PROTECTED]> writes:
> > template1=# select '1 year'::interval = '360 days'::interval;
> > ?column?
> > --
> > t
> > (1 row)
>
> Yeah, if you look at interval_cmp_internal() it's fairly
Doug McNaught <[EMAIL PROTECTED]> writes:
> template1=# select '1 year'::interval = '360 days'::interval;
> ?column?
> --
> t
> (1 row)
Yeah, if you look at interval_cmp_internal() it's fairly obvious why.
I think that this definition is probably bogus, and that only intervals
that matc
On Fri, 2004-10-22 at 07:52, Davide Negri wrote:
> Hello,
>
> i have installed the 8.0 beta3-dev1 version of postgres on my pc, and
> I want to disable log. How can I do? It is possible to disable and
> donât write all the log, or how can I write all the log in a specific
> directory??
If you us
On Wed, 2004-10-20 at 13:47, Vassilev, Lubomir G. wrote:
> ok, this is what's going on. i have this VB.NET application with
> Oracle 8.1.7 back end, but now i have to switch the whole thing to
> PostgreSQL. how do i do that? it's a big database, about 135 tables, a
> lot of views, triggers, a few s
On Thu, 2004-10-21 at 02:39, Karim Nassar wrote:
> I need to have an exact copy of a postgres install on a testing
> computer. I don't want to do slony. Is it feasible/reasonable to think
> that I could just rsync to the devel boxen from the pg server? Or is
> slony "The Way to Do It"(tm)?
If you
Tom Lane <[EMAIL PROTECTED]> writes:
> "Ricardo Perez Lopez" <[EMAIL PROTECTED]> writes:
>> I have observed that, for PostgreSQL, one year is actually 360 days:
>
>> SELECT '1 year'::timestamp = '360 days'::timestamp;
>
>> ?column?
>> -
>> t
>
> Nonsense.
>
> regression=# SELECT '1
James Robinson <[EMAIL PROTECTED]> writes:
> Just a sanity check -- data fed into pg using the
> COPY tablename (col1, col2) FROM stdin;
> ... data
> \.
> Does not cause referential triggers to fire (i.e. foreign keys), right?
Sure it does.
regression=# create table t1 (f1 int
"Ricardo Perez Lopez" <[EMAIL PROTECTED]> writes:
> I have observed that, for PostgreSQL, one year is actually 360 days:
> SELECT '1 year'::timestamp = '360 days'::timestamp;
> ?column?
> -
> t
Nonsense.
regression=# SELECT '1 year'::timestamp = '360 days'::timestamp;
ERROR: in
"Tim Vadnais" <[EMAIL PROTECTED]> writes:
> My questions are: Is there a way I can dynamically determine the number of
> fields in the row that is being maintained. (a function much like:
> PQnfields(const PGresult *); )
> Then I need a way to get the name of the field (using a function much like:
Recently there has been some discussion about attaching a timezone to
a timestamp and some other discussion about including a 'day' part
in the interval type. These two features impact each other, since
if you add a 'day' to a timestamp the result can depend on what timezone
the timestamp is suppos
On Sat, Oct 23, 2004 at 10:10:41 +0200,
Bilicki Vilmos <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have upgraded my cygwin installation and it has replaced my old 7.3
> postgresql.
>
> My questions are the following:
>
> How can I use the old files with the newer version?
> If this is not poss
On Fri, Oct 22, 2004 at 13:37:19 +0200,
Ricardo Perez Lopez <[EMAIL PROTECTED]> wrote:
> Hello everyone:
>
> I'm a PostgreSQL newbie, working now with dates, times, timestamps and
> intervals.
>
> I have three questions about the above:
>
> FIRST:
>
>
> I have observed that, for Pos
On Thu, Oct 21, 2004 at 18:14:15 -0500,
Vic Cekvenich <[EMAIL PROTECTED]> wrote:
> I am trying to write a sigle command to update the max number from detail.
>
> Something like:
> update group set max_msgid=max(c.msgid)
> from group g, content c
> where g.id=c.g_id
>
> So group is m
Just a sanity check -- data fed into pg using the
COPY tablename (col1, col2) FROM stdin;
... data
\.
Does not cause referential triggers to fire (i.e. foreign keys), right?
It seems to operate this way, yet I didn't see this mentioned
explicitly in the SQL reference manua
On Thu, Oct 21, 2004 at 01:39:26 -0700,
Karim Nassar <[EMAIL PROTECTED]> wrote:
> I need to have an exact copy of a postgres install on a testing
> computer. I don't want to do slony. Is it feasible/reasonable to think
> that I could just rsync to the devel boxen from the pg server? Or is
> slony
Cheers,
I have a problem with postgresql7.4.1 on a SuSE machine. I use the
database for a C#-application for a small company to store their
clients, sales, etc... This all works flawless since 1 year. Since 2
weeks the database hangs if I perform long queries with views involved
in order to genera
Hello,
i have installed postgres 8.0 beta3 as a program on
my pc on windows xp. I have read on the installation note file that postgres
server will not run with administrative permissions. I have read on your forum
that this happened because i have installed the beta version: is it true t
ok, this is what's
going on. i have this VB.NET
application with Oracle
8.1.7 back end, but now i have to switch the whole thing to PostgreSQL. how do
i do that? it's a big database,
about 135 tables, a lot of views, triggers, a few stored procedures and
functions. i understand there are to
[EMAIL PROTECTED] (Jiří Němec) writes:
> I am looking for some modeler to create a database structure - tables,
> relations etc. I use DBDesigner, but it is primarily designated for
> MySQL.
Druid (http://druid.sourceforge.net/), although it's not on the list of
PostgreSQL GUI tools.
Bill
--
Bi
Hi all,
I have upgraded my cygwin installation and it has replaced my old 7.3
postgresql.
My questions are the following:
How can I use the old files with the newer version?
If this is not possible, how can I migrate my database to a newer version
without the old database engine?
If this is not
ok, this is what's
going on. i have this VB.NET application with Oracle 8.1.7 back end, but now i
have to switch the whole thing to PostgreSQL. how do i do that? it's a big
database, about 135 tables, a lot of views, triggers, a few stored procedures
and functions. i understand there is som
Hello everyone:
I'm a PostgreSQL newbie, working now with dates, times, timestamps and
intervals.
I have three questions about the above:
FIRST:
I have observed that, for PostgreSQL, one year is actually 360 days:
SELECT '1 year'::timestamp = '360 days'::timestamp;
?column?
-
I am trying to write a sigle command to update the max number from detail.
Something like:
update group set max_msgid=max(c.msgid)
from group g, content c
where g.id=c.g_id
So group is master, content is detail. I want group to stroe
max(msgid) from content.
Syntax help plz?
.V
-
I am trying to write a sigle command to update the max number from detail.
Something like:
update group set max_msgid=max(c.msgid)
from group g, content c
where g.id=c.g_id
So group is master, content is detail. I want group to stroe max(msgid)
from content.
Syntax help plz?
.V
--
Cheers,
I have a problem with postgresql7.4.1 on a SuSE machine. I use the
database for a C#-application for a small company to store their
clients, sales, etc... This all works flawless since 1 year. Since 2
weeks the database hangs if I perform long queries with views involved
in order to gener
Hello,
i have installed the 8.0 beta3-dev1 version of
postgres on my pc, and I want to disable log. How can I do? It is possible to
disable and don’t write all the log, or how can I write all the log in a
specific directory??
Thanks
Negri Davide
---
Outgoing mail is certif
Is there a schema repository somewhere?
i am looking for a data warehouse clickstream schema to get some view on
how others have made such a schema.
---(end of broadcast)---
TIP 8: explain analyze is your friend
I need to have an exact copy of a postgres install on a testing
computer. I don't want to do slony. Is it feasible/reasonable to think
that I could just rsync to the devel boxen from the pg server? Or is
slony "The Way to Do It"(tm)?
\<.
---(end of broadcast)-
Hi,
My boss wants to add some logging functionality to some of our tables on
update/delete/insert. I need to log who, when, table_name, field name,
original value and new value for each record, but only logging modified
fields, and he wants me to do this wing postgres pgSQL triggers.
We are give
Hello,
I have a problem using latin2 in postgresql 8 (beta2) with Delphi,
with settings client_encoding = server_encoding = latin2 for database
there is no way I could post special characters
to database, i try with BDE ,dbexpress, delphi 5 & 7 and
usualy receive: ignoring unconvertible UTF-8 cha
Mike Nolan <[EMAIL PROTECTED]> writes:
>> You are correct. nextval() is guaranteed never to give the same number
>> (unless setval() were used to reset the sequence value).
> Or unless the sequence wraps around. That's less likely (and less
> dangerous) than having the OID wrap around, but not
On Sat, 23 Oct 2004, Mike Nolan wrote:
> I personally believe that there is value in a database-generated unique
> value like Oracle's ROWID. (Part of what I like about it is that since
> it is a system column it simplifies some application issues, since the
> app never has to worry about that co
On 23 Oct 2004 at 10:42, A. Mous wrote:
>
> Note, if I install the ODBC driver separately, these characters do not show
> up. Therefore, this seems to be an issue specific to the Win installer, no?
>
No, not as such. It is a problem with the version of the ODBC driver that
ships with Beta2 De
> You are correct. nextval() is guaranteed never to give the same number
> (unless setval() were used to reset the sequence value).
Or unless the sequence wraps around. That's less likely (and less
dangerous) than having the OID wrap around, but not impossible.
I personally believe that there
Not sure if this is a win installer issue or Microsoft MDAC issue...
I've installed the win32 pg8.0 beta2 dev3 along with the accompanying ODBC
that is packaged with the installer. Works great, love it, and all the
rest. My application uses ADO 2.7 to interface with the ODBC driver.
My applicat
On Sat, 2004-10-23 at 17:46 +0200, Leen Besselink wrote:
> Eddy Macnaghten zei:
> > I think you are correct in not using OIDs, as, firstly, as you point out
> > they are optional, also that they are not neccessarily unique.
> >
>
> I'm sorry Eddy, but you most be mistaken:
>
> Every row in POSTGR
On Sat, 23 Oct 2004, Leen Besselink wrote:
> Eddy Macnaghten zei:
> > I think you are correct in not using OIDs, as, firstly, as you point out
> > they are optional, also that they are not neccessarily unique.
> >
>
> I'm sorry Eddy, but you most be mistaken:
>
> Every row in POSTGRESQL is assigne
On Fri, 2004-10-22 at 22:26 -0400, Christopher Browne wrote:
> > I suspected it, I currently can not use it because of this. Any
> > chance to have a slony rpm compatible with the 7.4.5 rpm ?
>
> If someone contributes RPM packages, using the same GCC and the same
> RPM source RPM, then presumably
On Sat, Oct 23, 2004 at 14:52:31 +0200,
Leen Besselink <[EMAIL PROTECTED]> wrote:
>
> id = nextval ("whatever_id_seq");
> insert into whatever (id, text) values (id, 'something');
>
> Something that works always... better, but you need to know the name of
> the sequence, bummer.
In 8.0 (curren
On Sat, Oct 23, 2004 at 12:30:07 +0200,
Ruediger Herrmann <[EMAIL PROTECTED]> wrote:
> Hello again,
>
> as I am new to PostgreSQL (great pice of softwork btw) this probably won't
> be the last question.
>
> I access PostgreSQL from Java via the PostgreSQL JDBC driver. I am
> currently building
I have a PHP script that was having problems using the COPY command with
files around 1500 lines in size. The script will build the copy data
from incoming CSV file into a temp file, then start a COPY command and
loop through the copy data using pg_put_line to insert and then
pg_end_copy after post
Eddy Macnaghten zei:
> I think you are correct in not using OIDs, as, firstly, as you point out
> they are optional, also that they are not neccessarily unique.
>
I'm sorry Eddy, but you most be mistaken:
Every row in POSTGRESQL is assigned a unique, normally invisible number
called an object ide
Eddy Macnaghten <[EMAIL PROTECTED]> writes:
> The other thing to be aware of is if a large number of people are
> writing to the database concurrently it can go wrong (any method). That
> is if you insert a record (using nextval for the sequence), then someone
> else quickly inserts a row too bef
On Sat, 23 Oct 2004, Philip Hofstetter wrote:
> > As for what's SQL standard, I think by a strict definition your query
> > shouldn't be allowed at all, referencing an undefined table.
>
> This is exactly what I think too. I mean: I know I made an error in my
> query. It would just have been easie
On Sat, Oct 23, 2004 at 02:35:20PM +, Philip Hofstetter wrote:
> >As for what's SQL standard, I think by a strict definition your query
> >shouldn't be allowed at all, referencing an undefined table.
>
> This is exactly what I think too. I mean: I know I made an error in my
> query. It would
I think you are correct in not using OIDs, as, firstly, as you point out
they are optional, also that they are not neccessarily unique.
The use of sequences is an idea, however, why the complication? Why not
simply use a sequence called "mytable_sequence", or "mytable_id" where
"mytable" is the n
Hi,
Martijn van Oosterhout wrote:
popscan_light=> select aliasa.name, aliasb.name2 from a aliasa left join
b aliasb using (id) order by b.name2;
NOTICE: adding missing FROM-clause entry for table "b"
name | name2
---+---
gnegg | gnegglink
blepp | blepplink
gnegg | gnegglink
blepp |
On Sat, Oct 23, 2004 at 02:17:16PM +, Philip Hofstetter wrote:
> Hello,
>
> I think, I found a bug, but maybe it's just my stupidity. Granted: What
> I did was an error on my part, but I still think, PostgreSQL should not
> do what it does.
... snip ...
> popscan_light=> select aliasa.name
select b.name as viewer, count(*)
from viewer_movies a, xenons b
where b.id = a.viewerid
group by b.name
On Sat, 2004-10-23 at 00:55, Mark Harrison wrote:
> How can I combine these two queries?
>
> # select viewerid,count(*) from viewer_movies group by viewerid order by viewerid;
> viewerid |
Hello,
I think, I found a bug, but maybe it's just my stupidity. Granted: What
I did was an error on my part, but I still think, PostgreSQL should not
do what it does.
I've already created a simple testcase:
popscan_light=> create table a (id serial, name varchar(10), primary
key(id)) without o
In order to address a recent security report from iDefence, we have
released 3 new "point" releases: 7.2.6, 7.3.8 and 7.4.6
Although rated only a Medium risk, according to their web site: "A
vulnerability exists due to the insecure creation of temporary files,
which could possibly let a malicio
Hi pgsql-general,
(all examples are pseudo-code)
We really love PostgreSQL, it's getting better and better, there is just
one thing, something that has always led to some dislike: OID's
I understand why they did it and all, but still.
To make life easier, it's always good to find a general way
Hello again,
as I am new to PostgreSQL (great pice of softwork btw) this probably won't
be the last question.
I access PostgreSQL from Java via the PostgreSQL JDBC driver. I am
currently building a little framework that provides basic CRUD
operations by mapping class properties to database colum
Tom Lane wrote:
Cott Lang <[EMAIL PROTECTED]> writes:
Fiddling with the above values, only setting sort_mem absurdly large
easily causes NAN.
Ah. I see an overflow case for sort_mem exceeding 1Gb; that's probably
what you tickled.
I've fixed this in HEAD, but it doesn't seem worth back-patching
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Scott Marlowe wrote:
| On Fri, 2004-10-22 at 17:11, Gaetano Mendola wrote:
|
|>Scott Marlowe wrote:
|>
|>>On Wed, 2004-10-20 at 08:06, Dan Pelleg wrote:
|>>
|>>
|>>>I'm trying to access a table with about 120M rows. It's a vertical version
|>>>of a tabl
62 matches
Mail list logo