2016-09-29 122 views
0

是否有可能通过PHPAWS SDK for PHP查询Amazon Redshift数据库,如果有,将包含哪些类以及我将调用哪些函数?我无法在其网站上找到相关文档。我看到文档(http://docs.aws.amazon.com/aws-sdk-php/v2/guide/service-redshift.html)使用Aws\Redshift\RedshiftClient类中的Factory函数登录到Redshift数据库的客户端对象,但我没有看到任何文档在连接到该数据库后查询该数据库。通过PHP查询Amazon Redshift数据库

回答

0

不,您可以使用相同的方法来查询Redshift,以查询PostgreSQL数据库。您无法使用AWS SDK来查询Redshift。

+0

好吧,我可以用'pg_connect()'连接到数据库,用'pg_query()'查询并使用这里列出的其他函数:http://php.net/manual/en/book。 pgsql.php? – jerbear

+0

是的。 Redshift与PostgreSQL兼容。阅读:http://docs.aws.amazon.com/redshift/latest/dg/c_redshift-and-postgres-sql.html –