Discussion:
Track changes to function code
Rebecca Clarke
2014-07-21 12:25:50 UTC
Permalink
Hi all,

At present when a function is being edited we keep note of when and by who
within comments in the function's code.
Is there, or can anyone recommend, any open source software that tracks
function activity when it comes to edits (not executions)?

I tried searching on the web, but all I find concerns the tracking of data
changes.

Thanks in advance.
Jacob Bunk Nielsen
2014-07-21 12:36:21 UTC
Permalink
Post by Rebecca Clarke
At present when a function is being edited we keep note of when and
by who within comments in the function's code.
That sounds cumbersome.
Post by Rebecca Clarke
Is there, or can anyone recommend, any open source software that
tracks function activity when it comes to edits (not executions)? 
How about keeping the code outside of the database in a VCS such as git,
Subversion or whatever you are used to using for other code projects?

That will also make it possible easily go back to previous versions if
you should need to some day.

You simply put your functions in one or more .sql files that you
version control using e.g. git.

Once you have written your functions you can put them in you database
using:

psql -f myfile.sql
--
Jacob
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Pavel Stehule
2014-07-21 13:12:40 UTC
Permalink
Hi
Post by Jacob Bunk Nielsen
Post by Rebecca Clarke
At present when a function is being edited we keep note of when and
by who within comments in the function's code.
That sounds cumbersome.
Post by Rebecca Clarke
Is there, or can anyone recommend, any open source software that
tracks function activity when it comes to edits (not executions)?
How about keeping the code outside of the database in a VCS such as git,
Subversion or whatever you are used to using for other code projects?
That will also make it possible easily go back to previous versions if
you should need to some day.
You simply put your functions in one or more .sql files that you
version control using e.g. git.
Once you have written your functions you can put them in you database
psql -f myfile.sql
yes, it is good way

stored procedures are code as any other and there are same rules. Use
files, use a your preferred editor, use makefiles, use GIT

Regards

Pavel Stehule
Post by Jacob Bunk Nielsen
--
Jacob
--
http://www.postgresql.org/mailpref/pgsql-general
Rebecca Clarke
2014-07-21 13:22:43 UTC
Permalink
Thanks guys. I'll check that out.
Post by Pavel Stehule
Hi
Post by Jacob Bunk Nielsen
Post by Rebecca Clarke
At present when a function is being edited we keep note of when and
by who within comments in the function's code.
That sounds cumbersome.
Post by Rebecca Clarke
Is there, or can anyone recommend, any open source software that
tracks function activity when it comes to edits (not executions)?
How about keeping the code outside of the database in a VCS such as git,
Subversion or whatever you are used to using for other code projects?
That will also make it possible easily go back to previous versions if
you should need to some day.
You simply put your functions in one or more .sql files that you
version control using e.g. git.
Once you have written your functions you can put them in you database
psql -f myfile.sql
yes, it is good way
stored procedures are code as any other and there are same rules. Use
files, use a your preferred editor, use makefiles, use GIT
Regards
Pavel Stehule
Post by Jacob Bunk Nielsen
--
Jacob
--
http://www.postgresql.org/mailpref/pgsql-general
Loading...