Creating a view of two tables from two different databases in postgresql
Posted on 2007-11-30
I have this MYSQL code. This code creates a view in database asterisk and reads from another databse called openser.
CREATE VIEW vmusers AS
SELECT phplib_id as uniqueid,
username as customer_id,
'default' as context,
username as mailbox,
vmail_password as password,
CONCAT(first_name,' ',last_name) as fullname,
email_address as email,
NULL as pager,
datetime_created as stamp
I'm trying to figure out how to translate that into Postgresql code. I have looked around but cant seem to find any docs on how to accomplish this.
Right now I get
ERROR: schema "openser" does not exist
SQL state: 3F000
When I try to execute the above code in postgres.