[GENERAL] python api to backup/restore data

2007-08-04 Thread Acm
I am working with Postgresql 8.2.4 and Python 2.5. I would like to know whether an API for accessing Postgresql from Python exists and whether or not it supports commands for backing up a database (or schema) and restoring a backup file. I heard about psycopg and psycopg2 but have no idea of how

[GENERAL] return 1 formatted result instead of multiple results

2007-09-02 Thread Acm
I want to query a column in a table that returns multiple records, append the values of that column in a comma separated string, and return that string. example: select * from people; returns 3 results: Mike John Dennis and I want one result to be "Mike,John,Dennis". How can I format my r

[GENERAL] use COPY TO on normalized database

2007-09-14 Thread Acm
I am working with PostgreSQL 8.2.4. I need to use the SQL COPY (COPY table FROM file) statement to populate my database. I have created a normalized data model (up to 3NF). Is it possible to use COPY TO on a particular table (that is linked to other tables using foreign keys) whilst keeping the