Re: [GENERAL] re-post
От | Teodor Cimpoesu |
---|---|
Тема | Re: [GENERAL] re-post |
Дата | |
Msg-id | 37CD968E.EC55BFA0@digiro.net обсуждение исходный текст |
Ответ на | Re: [GENERAL] re-post ("amy cheng" <amycq@hotmail.com>) |
Список | pgsql-general |
amy cheng wrote: > > >I can answer least 50% on all of your question only after reading the > >"programmer's guide", > >one night,( and was also doin' a Postgres+Apache+PHP installation in > >parallel). > >So did you rtfm? > OK, I understand you are smart! BTW, what is "rtfm" ;-) 10x but my point was that you can answer your Qs *only* if you read first some documentation, or "read the fine material". > > > the difference between PL/pgSQL and tcl (note that postgreSQL also > >support > > > tcl now), > >eww, a big one. tcl is rather a programming language, PL/pgSQL, as it's > >name states > >is a procedural language, used only in functions. > postgresql now also use tcl as its "intra-server" procedural language. > I have the feeling that tcl is more powerful than PL/pgSQL, and also > tcl is more generally used, seems to me tcl is the future direction, > although PL/pgSQL has more examples now (and closer to Oracle guys). I know next to nothing about tcl, but if it fits you needs, go w/ it. > > > does PL/pgSQL support array-like feature? how about tcl in postgreSQL? > >dunno, did you try? > no. I'm a newbie, but a serious one. That is why I asked so many "non > technical" questions. > > > if I want use OS (i.e. external to dababase), can I use PL/pgSQL or tcl? > >if > > > in C (spi), is it easy? anyway to get perl involved? > >?? I didn't get this Q, if you are refering to postgres API, if you can > >use PL/pgSQL > >in, say, C code, I think everything that backend sais is valid, will be. > >Also have a look @ ecpg. The cleaner way is through libpq. And the C++ > >API looks also nice. > >And yep , you can get perl involved through it's DBI. > I guess what I'm really asking is: > > 1) can I somehow use perl to > write triggers (and "stored procedures" in general) -- I understand it is > not possible for the whole part, it is only possible for > PL/pgSQL, tcl and C, but can I wirte part of it ? i.e., called by C or tcl > or PL/pgSQL? Why I want to do this? this leads to the second if you have the perl hammer in your hand, don't look at everything like @ a nail :) Of course you may write a C function to do system("myscript.pl"), but I wouldn't be proud of that :) > question: > 2) I want to do copy-file-kind of thing in trigger. I know it can > be done through application side. But that is not convenient. And > to do that easily, as everybody knows :-), perl is the best. However, even > without perl, is PL/pgSQL and tcl possible? I assume C can > do it, anybody tried? easy to do? read in the programmer's guide: 14. Server Programming Interface 16. libpq veery interesting, I meant it! > amy > > ______________________________________________________ > Get Your Private, Free Email at http://www.hotmail.com > > ************ -- CIMPOESU Teodor, Web Programmer (h) @ DIGICOM S.A. Bucharest, Romania @ Internet, site development @ teo@digiro.net, +(401)-330.47.28 official home page ~ http://www.digiro.net/ Internet web page ~ http://internet.digiro.net/
В списке pgsql-general по дате отправления: