Re: [SQL] Start up question about triggers

2006-06-22 Thread Forums @ Existanze
c: pgsql-sql@postgresql.orgSubject: Re: [SQL] Start up question about triggers Why not just create a history table and have the trigger copy the data out of the table into the history table with a time stamp of the change.  Then you don't need the query.For exampleTable A

Re: [SQL] Start up question about triggers

2006-06-22 Thread Aaron Bono
Why not just create a history table and have the trigger copy the data out of the table into the history table with a time stamp of the change.  Then you don't need the query.For exampleTable Aa_id,a_value1, a_value2Table A_hista_id,a_dt,a_value1,a_value2Then A_hist has a PK of a_id, a_dtThis would

Re: [SQL] Start up question about triggers

2006-06-22 Thread Forums @ Existanze
Sorry This is the complete message   Hello all,   I know that this question may be really simple, but I have decided to ask here due to fact that I don't know how to search for this on google or on the docs.   I created a trigger fuction which updates a specific row in some table A. Is it p

Re: [SQL] start

2004-05-04 Thread Andrei Bintintan
You say that you're running Suse 8. You can also start the process with that Yast. Start Yast2 -> System -> Runlevel Editor-> and then you can select the runlevel when you want that postgre starts. I start it at runlevel 3. If you installed postgre it manually you have a little work to do, probabl

Re: [SQL] start

2004-05-03 Thread scott.marlowe
On Mon, 3 May 2004, H.J. Sanders wrote: > > Hello list. > > > I have difficulties starting the postmaster automatically at boot time > (everything I tried is done by 'root'). > > Can someone give me an example for LINUX (SUSE 8). Just FYI, this probably belongs on admin, but no biggie. I sta

Re: [SQL] start

2004-05-03 Thread Peter Eisentraut
H.J. Sanders wrote: > I have difficulties starting the postmaster automatically at boot > time (everything I tried is done by 'root'). > > Can someone give me an example for LINUX (SUSE 8). Maybe you would rather want to download the binary packages, which take care of that. RPMs for SuSE are av

Re: [SQL] Start-up problems

2004-01-08 Thread Kaloyan Iliev Iliev
Look at /etc/ beyaRecords - The home Urban music wrote: Kaloyan, thanks for reply. Still finding my way around the unix environment so could you tell me where the file you mention is situated? On 8 Jan 2004, at 13:24, Kaloyan Iliev Iliev wrote: This is what I have in my rc.local on FreeBSD: su

Re: [SQL] Start-up problems

2004-01-08 Thread Johannes Lochmann
On Thursday 08 January 2004 13:59, beyaRecords - The home Urban music wrote: > I am running postgresql 7.4.1 on OS X 10.3 and am having to manually > start-up postgresql using /usr/local/pgsql/bin/postmaster -i -D > /usr/local/pgsql/data. > > Is there a script available which will enable me to auto

Re: [SQL] Start and End Day of a Week

2003-02-07 Thread Luis Magaña
Hi, I've found my own answer... this is in case somebody needs it someday, it seems that works properly in PG 7.3, one function gives the start of the week and the other one the end: CREATE OR REPLACE FUNCTION weekstart(int4,int4) RETURNS TIMESTAMP AS' DECLARE year ALIAS FOR $1;

Re: [SQL] start and end of the week

2002-09-26 Thread Dmitry Tkach
Does any one know what is the reason not to put this logic into date_trunc () function? It seems to work with pretty much *any* unit imaginable, *except* for 'week'... Dima Bruno Wolff III wrote: > On Thu, Sep 26, 2002 at 11:55:48 -0400, > Jean-Luc Lachance <[EMAIL PROTECTED]> wrote: > >>How

Re: [SQL] start and end of the week

2002-09-26 Thread Bruno Wolff III
On Thu, Sep 26, 2002 at 11:55:48 -0400, Jean-Luc Lachance <[EMAIL PROTECTED]> wrote: > How about: > > select now() - date_part( 'DOW', now()) as starts_on, > now() -date_part( 'DOW', now()) + 6 as ends_on; That won't work in 7.3. The following works in both 7.2 and 7.3: area=> select curre

Re: [SQL] start and end of the week

2002-09-26 Thread Jean-Luc Lachance
How about: select now() - date_part( 'DOW', now()) as starts_on, now() -date_part( 'DOW', now()) + 6 as ends_on; "John Sebastian N. Mayordomo" wrote: > > How do I get the start and end date of the present week? > Is this possible? > > For example this week > Start = Sept. 22 > End = Sept

Re: [SQL] start and end of the week

2002-09-26 Thread Bruno Wolff III
On Thu, Sep 26, 2002 at 18:56:46 +0800, "John Sebastian N. Mayordomo" <[EMAIL PROTECTED]> wrote: > > > How do I get the start and end date of the present week? > Is this possible? > > For example this week > Start = Sept. 22 > End = Sept. 28 The following advice will work on 7.3. For 7.2.