![]() | |
![]() |
| | Thread Tools | Display Modes |
#41
| |||
| |||
|
|
Andreas Kretschmer ha scritto: Another curiosity: is there a way to retrieve the code of an already existant sp and save it onto a file? I was thinking about to retrieve it from information schema, I am trying to tinker with things like: |
#42
| |||
| |||
|
|
In article <4926d3a9$0$11378$5fc30a8 (AT) news (DOT) tiscali.it>, Coniglio Sgabbiato <nobody (AT) nowhere (DOT) it> wrote: Hi all, I am new to Postgres and now I am doing some programming in pl/pgsql. At this moment I am wirting procedures with a text editor and pasting them on psql commandline via putty (with the annoyance that you cannot paste more than a certain amount of text, so I have to slice them). Since I use and enjoy Vim directly from the server vis ssh, I wish to know if there is a way to create/edit pl/pgsql procedures directly from Vim. Dou you have a tip? I recommend PgAdminIII (http://pgadmin.org), an excellent free GUI client for Postgres. Does everything you need and more. You can create a SP by filling out a form, specifying function name, params, return type etc. You can type in the whole function definition as well, but a simple BEGIN...END; pair is sufficient. Now comes the cool part. Locate your newly defined function in the object tree, right-click and select "CREATE script". This opens a window with the source of your function, beginning with the magic "CREATE OR REPLACE FUNCTION..." You can edit the definition and then run it as a query: this stores the new definition in the DB and it is immediately available for testing. Much more productive IMHO than the text editor/psql combination. have fun, Inoshishi |

#43
| |||
| |||
|
|
In article <4926d3a9$0$11378$5fc30a8 (AT) news (DOT) tiscali.it>, Coniglio Sgabbiato <nobody (AT) nowhere (DOT) it> wrote: Hi all, I am new to Postgres and now I am doing some programming in pl/pgsql. At this moment I am wirting procedures with a text editor and pasting them on psql commandline via putty (with the annoyance that you cannot paste more than a certain amount of text, so I have to slice them). Since I use and enjoy Vim directly from the server vis ssh, I wish to know if there is a way to create/edit pl/pgsql procedures directly from Vim. Dou you have a tip? I recommend PgAdminIII (http://pgadmin.org), an excellent free GUI client for Postgres. Does everything you need and more. You can create a SP by filling out a form, specifying function name, params, return type etc. You can type in the whole function definition as well, but a simple BEGIN...END; pair is sufficient. Now comes the cool part. Locate your newly defined function in the object tree, right-click and select "CREATE script". This opens a window with the source of your function, beginning with the magic "CREATE OR REPLACE FUNCTION..." You can edit the definition and then run it as a query: this stores the new definition in the DB and it is immediately available for testing. Much more productive IMHO than the text editor/psql combination. have fun, Inoshishi |

#44
| |||
| |||
|
|
In article <4926d3a9$0$11378$5fc30a8 (AT) news (DOT) tiscali.it>, Coniglio Sgabbiato <nobody (AT) nowhere (DOT) it> wrote: Hi all, I am new to Postgres and now I am doing some programming in pl/pgsql. At this moment I am wirting procedures with a text editor and pasting them on psql commandline via putty (with the annoyance that you cannot paste more than a certain amount of text, so I have to slice them). Since I use and enjoy Vim directly from the server vis ssh, I wish to know if there is a way to create/edit pl/pgsql procedures directly from Vim. Dou you have a tip? I recommend PgAdminIII (http://pgadmin.org), an excellent free GUI client for Postgres. Does everything you need and more. You can create a SP by filling out a form, specifying function name, params, return type etc. You can type in the whole function definition as well, but a simple BEGIN...END; pair is sufficient. Now comes the cool part. Locate your newly defined function in the object tree, right-click and select "CREATE script". This opens a window with the source of your function, beginning with the magic "CREATE OR REPLACE FUNCTION..." You can edit the definition and then run it as a query: this stores the new definition in the DB and it is immediately available for testing. Much more productive IMHO than the text editor/psql combination. have fun, Inoshishi |

#45
| |||
| |||
|
|
In article <4926d3a9$0$11378$5fc30a8 (AT) news (DOT) tiscali.it>, Coniglio Sgabbiato <nobody (AT) nowhere (DOT) it> wrote: Hi all, I am new to Postgres and now I am doing some programming in pl/pgsql. At this moment I am wirting procedures with a text editor and pasting them on psql commandline via putty (with the annoyance that you cannot paste more than a certain amount of text, so I have to slice them). Since I use and enjoy Vim directly from the server vis ssh, I wish to know if there is a way to create/edit pl/pgsql procedures directly from Vim. Dou you have a tip? I recommend PgAdminIII (http://pgadmin.org), an excellent free GUI client for Postgres. Does everything you need and more. You can create a SP by filling out a form, specifying function name, params, return type etc. You can type in the whole function definition as well, but a simple BEGIN...END; pair is sufficient. Now comes the cool part. Locate your newly defined function in the object tree, right-click and select "CREATE script". This opens a window with the source of your function, beginning with the magic "CREATE OR REPLACE FUNCTION..." You can edit the definition and then run it as a query: this stores the new definition in the DB and it is immediately available for testing. Much more productive IMHO than the text editor/psql combination. have fun, Inoshishi |

#46
| |||
| |||
|
|
In article <4926d3a9$0$11378$5fc30a8 (AT) news (DOT) tiscali.it>, Coniglio Sgabbiato <nobody (AT) nowhere (DOT) it> wrote: Hi all, I am new to Postgres and now I am doing some programming in pl/pgsql. At this moment I am wirting procedures with a text editor and pasting them on psql commandline via putty (with the annoyance that you cannot paste more than a certain amount of text, so I have to slice them). Since I use and enjoy Vim directly from the server vis ssh, I wish to know if there is a way to create/edit pl/pgsql procedures directly from Vim. Dou you have a tip? I recommend PgAdminIII (http://pgadmin.org), an excellent free GUI client for Postgres. Does everything you need and more. You can create a SP by filling out a form, specifying function name, params, return type etc. You can type in the whole function definition as well, but a simple BEGIN...END; pair is sufficient. Now comes the cool part. Locate your newly defined function in the object tree, right-click and select "CREATE script". This opens a window with the source of your function, beginning with the magic "CREATE OR REPLACE FUNCTION..." You can edit the definition and then run it as a query: this stores the new definition in the DB and it is immediately available for testing. Much more productive IMHO than the text editor/psql combination. have fun, Inoshishi |

#47
| |||
| |||
|
|
In article <4926d3a9$0$11378$5fc30a8 (AT) news (DOT) tiscali.it>, Coniglio Sgabbiato <nobody (AT) nowhere (DOT) it> wrote: Hi all, I am new to Postgres and now I am doing some programming in pl/pgsql. At this moment I am wirting procedures with a text editor and pasting them on psql commandline via putty (with the annoyance that you cannot paste more than a certain amount of text, so I have to slice them). Since I use and enjoy Vim directly from the server vis ssh, I wish to know if there is a way to create/edit pl/pgsql procedures directly from Vim. Dou you have a tip? I recommend PgAdminIII (http://pgadmin.org), an excellent free GUI client for Postgres. Does everything you need and more. You can create a SP by filling out a form, specifying function name, params, return type etc. You can type in the whole function definition as well, but a simple BEGIN...END; pair is sufficient. Now comes the cool part. Locate your newly defined function in the object tree, right-click and select "CREATE script". This opens a window with the source of your function, beginning with the magic "CREATE OR REPLACE FUNCTION..." You can edit the definition and then run it as a query: this stores the new definition in the DB and it is immediately available for testing. Much more productive IMHO than the text editor/psql combination. have fun, Inoshishi |

#48
| |||
| |||
|
|
In article <4926d3a9$0$11378$5fc30a8 (AT) news (DOT) tiscali.it>, Coniglio Sgabbiato <nobody (AT) nowhere (DOT) it> wrote: Hi all, I am new to Postgres and now I am doing some programming in pl/pgsql. At this moment I am wirting procedures with a text editor and pasting them on psql commandline via putty (with the annoyance that you cannot paste more than a certain amount of text, so I have to slice them). Since I use and enjoy Vim directly from the server vis ssh, I wish to know if there is a way to create/edit pl/pgsql procedures directly from Vim. Dou you have a tip? I recommend PgAdminIII (http://pgadmin.org), an excellent free GUI client for Postgres. Does everything you need and more. You can create a SP by filling out a form, specifying function name, params, return type etc. You can type in the whole function definition as well, but a simple BEGIN...END; pair is sufficient. Now comes the cool part. Locate your newly defined function in the object tree, right-click and select "CREATE script". This opens a window with the source of your function, beginning with the magic "CREATE OR REPLACE FUNCTION..." You can edit the definition and then run it as a query: this stores the new definition in the DB and it is immediately available for testing. Much more productive IMHO than the text editor/psql combination. have fun, Inoshishi |

#49
| |||
| |||
|
|
In article <4926d3a9$0$11378$5fc30a8 (AT) news (DOT) tiscali.it>, Coniglio Sgabbiato <nobody (AT) nowhere (DOT) it> wrote: Hi all, I am new to Postgres and now I am doing some programming in pl/pgsql. At this moment I am wirting procedures with a text editor and pasting them on psql commandline via putty (with the annoyance that you cannot paste more than a certain amount of text, so I have to slice them). Since I use and enjoy Vim directly from the server vis ssh, I wish to know if there is a way to create/edit pl/pgsql procedures directly from Vim. Dou you have a tip? I recommend PgAdminIII (http://pgadmin.org), an excellent free GUI client for Postgres. Does everything you need and more. You can create a SP by filling out a form, specifying function name, params, return type etc. You can type in the whole function definition as well, but a simple BEGIN...END; pair is sufficient. Now comes the cool part. Locate your newly defined function in the object tree, right-click and select "CREATE script". This opens a window with the source of your function, beginning with the magic "CREATE OR REPLACE FUNCTION..." You can edit the definition and then run it as a query: this stores the new definition in the DB and it is immediately available for testing. Much more productive IMHO than the text editor/psql combination. have fun, Inoshishi |

![]() |
| Thread Tools | |
| Display Modes | |
| |