Re: [GENERAL] Having a problem with my stored procedure

2007-02-14 Thread Laura McCord
I did check with customer support (they are actual developers of the system not middle men) and they said there aren't any triggers in the db structure so it's safe for me to include triggers. So, that helps me feel reassured because you had a good point. So more than likely, it was my error and I

Re: [GENERAL] Having a problem with my stored procedure

2007-02-14 Thread Ted
> As suggested earlier, it is probably cleaner to define separate triggers > on insert and on update. That is possible, but they can't have the same > names. > You probably want to name them accordingly too, or you'll get naming > conflicts. > > I suggest: > DROP TRIGGER archive_articles ON news_co

Re: [GENERAL] Having a problem with my stored procedure

2007-02-14 Thread Alban Hertroys
Laura McCord wrote: > To make a long story short, I am archiving data from an original table > to a table I created. This is a third party web application that I am > doing this with, so I can't revise the structure/code of this > application. With this said, if the original table goes through an >

Re: [GENERAL] Having a problem with my stored procedure

2007-02-13 Thread Ted
On Feb 13, 1:45 pm, [EMAIL PROTECTED] (Laura McCord) wrote: > About your last comment, I can't do any revisions of the third party > application where the inserts and updates are occurring. Plus, this > whole idea came from a workaround based on a glitch in the software > where the expiration of ar

Re: [GENERAL] Having a problem with my stored procedure

2007-02-13 Thread Ted
e temporaries and then > > from the temporaries into their final destination? > > > HTH > > > Ted > > > - Original Message - > > *From:* William Leite Araújo <mailto:[EMAIL PROTECTED]> > > *To:* Laura McCord <mailto:[E

Re: [GENERAL] Having a problem with my stored procedure

2007-02-13 Thread Laura McCord
Ok, I think I am starting to put two-and-two together based on your thread and Ted's thread, I just realized that OLD. and NEW. are keywords in postgres. Alan Hodgson wrote: > On Tuesday 13 February 2007 11:35, Laura McCord > <[EMAIL PROTECTED]> wrote: > >> Here is a question that I am stu

Re: [GENERAL] Having a problem with my stored procedure

2007-02-13 Thread Alan Hodgson
On Tuesday 13 February 2007 11:35, Laura McCord <[EMAIL PROTECTED]> wrote: > Here is a question that I am stumped on: > > Does postgres even recognize last_inserted() as mysql does? I notice > that the function fails on that line. > Not, that's just a MySQL function. You could, however, look for

Re: [GENERAL] Having a problem with my stored procedure

2007-02-13 Thread Laura McCord
Here is a question that I am stumped on: Does postgres even recognize last_inserted() as mysql does? I notice that the function fails on that line. Thanks, Laura Tom Lane wrote: > Laura McCord <[EMAIL PROTECTED]> writes: > >> I tried doing two different triggers as you suggested but I kept g

Re: [GENERAL] Having a problem with my stored procedure

2007-02-13 Thread Tom Lane
Laura McCord <[EMAIL PROTECTED]> writes: > I tried doing two different triggers as you suggested but I kept getting > an error stating: > psql:archive_news_articles.sql:75: ERROR: trigger "archive_articles" > for relation "news_content" already exists > psql:archive_news_articles.sql:80: ERROR:

Re: [GENERAL] Having a problem with my stored procedure

2007-02-13 Thread Laura McCord
t;> from the temporaries into their final destination? >> >> HTH >> >> Ted >> >> - Original Message ----- >> *From:* William Leite Araújo <mailto:[EMAIL PROTECTED]> >> *To:* Laura McCord <mailto:[EMAIL PROTECTED]> >>

Re: [GENERAL] Having a problem with my stored procedure

2007-02-13 Thread Laura McCord
;mailto:[EMAIL PROTECTED]> > *Cc:* pgsql-general@postgresql.org > <mailto:pgsql-general@postgresql.org> > *Sent:* Tuesday, February 13, 2007 12:19 PM > *Subject:* Re: [GENERAL] Having a problem with my stored procedure > > 2007/2/13, Laura McCord <[E

Re: [GENERAL] Having a problem with my stored procedure

2007-02-13 Thread Ted Byers
neral@postgresql.org Sent: Tuesday, February 13, 2007 12:19 PM Subject: Re: [GENERAL] Having a problem with my stored procedure 2007/2/13, Laura McCord <[EMAIL PROTECTED]>: To make a long story short, I am archiving data from an original table to a table I created. This is a thir

Re: [GENERAL] Having a problem with my stored procedure

2007-02-13 Thread William Leite Araújo
2007/2/13, Laura McCord <[EMAIL PROTECTED]>: To make a long story short, I am archiving data from an original table to a table I created. This is a third party web application that I am doing this with, so I can't revise the structure/code of this application. With this said, if the original tab

[GENERAL] Having a problem with my stored procedure

2007-02-13 Thread Laura McCord
To make a long story short, I am archiving data from an original table to a table I created. This is a third party web application that I am doing this with, so I can't revise the structure/code of this application. With this said, if the original table goes through an insert or update action I wan