How to export a view data from Postgresql/Phppgadmin
-
29-09-2019 - |
Question
I know how to export a table via PhpPgAdmin.
Is there a way I can export a view data out of PhpPgAdmin.
Thanks.
Solution
SELECT
definition
FROM
pg_views
WHERE
schemaname = 'public'
AND
viewname = 'your_view';
OTHER TIPS
There is an option to do it through phpPGadmin as well.
- Make the view
- Select the view
- underneath your columns selected for the view there is an option 'select'
- in this select screen select the option " Select All Fields"
- run the select
- you get the results 30 per page
- at the bottom of the results there is an option 'download'
- select your kind of export you want (CSV, XHTML, ...)
- select download
I know its a late reply but i had to search myself this one and this was the first result from google so I hope this helps other google hitters :)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow