![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
[...] So for example a project named "THE EVIL PROJECT" has begun in development and is due for release on 28-12-2007 (british date format) [...] |
|
But would it be possible to create a function that checks the current date against the database live date for each project and when they match run an update statement to automatically change the status ID for that project? |
|
I know for functionallity like this a full programming language would be better used but the project is already so big that full re-write is not on the cards and I was hoping to find a way to make postgres do the work. |
#3
| ||||
| ||||
|
|
I am *still* working with a legacy system written in Python and Postgres, the current feature I am working on is to automatically modify project status based on a date. So for example a project named "THE EVIL PROJECT" has begun |
|
in development and is due for release on 28-12-2007 (british date format) which is stored in the database against the project ID. Using Python the project status would only be updated when the page that handles the project ID's is accessed But would it be possible to create a function that checks the current date against |
|
the database live date for each project and when they match run an update statement to automatically change the status ID for that project? |
|
I know for functionallity like this a full programming language would be better used but the project is already so big that full re-write is not on the cards and I was hoping to find a way to make postgres do the work. |
#4
| |||
| |||
|
|
Fuzzydave <dav.phill... (AT) ntlworld (DOT) com> wrote: I am *still* working with a legacy system written in Python and Postgres, the current feature I am working on is to automatically modify project status based on a date. So for example a project named "THE EVIL PROJECT" has begun Is 'project' a database table? in development and is due for release on 28-12-2007 (british date format) which is stored in the database against the project ID. Using Python the project status would only be updated when the page that handles the project ID's is accessed But would it be possible to create a function that checks the current date against Are you looking for a function IN the database that operates on database objects? the database live date for each project and when they match run an update statement to automatically change the status ID for that project? If the answer to both of the above questions is 'yes', you can write such a function using any PostgreSQL procedural language, I guess. I know for functionallity like this a full programming language would be better used but the project is already so big that full re-write is not on the cards and I was hoping to find a way to make postgres do the work. PostgreSQL procedural languages are full programming languages. Did I understand your problem correctly? If not, maybe you can be more precise in the description of your setup and your problem. Yours, Laurenz Albe |
![]() |
| Thread Tools | |
| Display Modes | |
| |