Hi, can anybody tell me, how to write function in plpgsql, which generates html table and is called like this:

SELECT funktionName( 'Select name, salary*1.2 from employees where salary IN ( SELECT MIN(SALARY) from employees where salary>'||salary||') ' ) from employees where ssn=111;

Thanks for help.

link|flag

+1 and @whoever-downvoted this is not a bad question so why vote it down? – JackPDouglas Dec 13 at 18:37

1 Answer

You can generate XML using Postgres' XML features and transform that into HTML using XSLT. There is an example for that in the manual

But this is definitely not a recommended approach.

link|flag
"But this is definitely not a recommended approach." -- Why not? – ObiWanKenobi Dec 17 at 22:28

Your Answer

 
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.