postgresql

Using Dapper and Postgresql - citext data type

雨燕双飞 提交于 2021-02-07 21:48:05
问题 I'm not sure if there is a way to support this, but I'm having trouble getting Dapper to map string parameter values to the Postgresql citext data type as it seems to be using the text type. In particular, I'm trying to call a function that takes in citext parameters - the error I get back is: var c = ConnectionManager<T>.Open(); string sql = @"select * from ""dbo"".""MyFunction""(@schemaName, @tableName);"; var param = new { schemaName = schema, tableName = table }; string insecureSalt = c

CommandError: You appear not to have the 'psql' program installed or on your path

对着背影说爱祢 提交于 2021-02-07 20:45:24
问题 I'm using Windows, no virtualenv. I have psycopg2 installed with Pip, and the latest version of PostgreSQL installed as well. When I run ./ manage.py dbshell , I get the following error: CommandError: You appear not to have the 'psql' program installed or on your path. When I run ./ manage.py dbshell psql , I get this: usage: manage.py dbshell [-h] [--version] [-v {0,1,2,3}] [--settings SETTINGS] [--pythonpath PYTHONPATH] [--traceback] [--no-color] [--database DATABASE] manage.py dbshell:

CommandError: You appear not to have the 'psql' program installed or on your path

浪子不回头ぞ 提交于 2021-02-07 20:43:25
问题 I'm using Windows, no virtualenv. I have psycopg2 installed with Pip, and the latest version of PostgreSQL installed as well. When I run ./ manage.py dbshell , I get the following error: CommandError: You appear not to have the 'psql' program installed or on your path. When I run ./ manage.py dbshell psql , I get this: usage: manage.py dbshell [-h] [--version] [-v {0,1,2,3}] [--settings SETTINGS] [--pythonpath PYTHONPATH] [--traceback] [--no-color] [--database DATABASE] manage.py dbshell:

Can't create extensions plv8 postgresql

╄→гoц情女王★ 提交于 2021-02-07 20:40:16
问题 After install postgres, can't create extension plv8. I'm use: CREATE EXTENSION plv8; I'm getting: ERROR: could not open extension control file "/usr/local/share/postgresql/extension/plv8.control": No such file or directory ********** Error ********** ERROR: could not open extension control file "/usr/local/share/postgresql/extension/plv8.control": No such file or directory SQL state: 58P01 version postgres: 9.6.2 version pgAdmin4: 1.4 How to install plv8? 回答1: This should work on most

Can't create extensions plv8 postgresql

こ雲淡風輕ζ 提交于 2021-02-07 20:39:15
问题 After install postgres, can't create extension plv8. I'm use: CREATE EXTENSION plv8; I'm getting: ERROR: could not open extension control file "/usr/local/share/postgresql/extension/plv8.control": No such file or directory ********** Error ********** ERROR: could not open extension control file "/usr/local/share/postgresql/extension/plv8.control": No such file or directory SQL state: 58P01 version postgres: 9.6.2 version pgAdmin4: 1.4 How to install plv8? 回答1: This should work on most

How to list all databases and their schemas in postgresql?

家住魔仙堡 提交于 2021-02-07 20:20:47
问题 I am looking for a way to list all databases and all schemas on an OpenSuse postgresql server. I know that I can use the meta commands such as \l+ to list all of the databases, but is there any way to list all information for all databases including databases, schema and size information? I'd like a way to look at everything overall. Thanks! 回答1: I don't see a way to get the list of databases's schemas without connecting to it first. Based on this, i think you can get it using db_link with

How to list all databases and their schemas in postgresql?

老子叫甜甜 提交于 2021-02-07 20:16:17
问题 I am looking for a way to list all databases and all schemas on an OpenSuse postgresql server. I know that I can use the meta commands such as \l+ to list all of the databases, but is there any way to list all information for all databases including databases, schema and size information? I'd like a way to look at everything overall. Thanks! 回答1: I don't see a way to get the list of databases's schemas without connecting to it first. Based on this, i think you can get it using db_link with

Export query results from BigQuery to Postgres

半腔热情 提交于 2021-02-07 20:02:20
问题 I am trying to export the results of a query in BigQuery, and get the data into Postgres. The data may be as much 250 million record, ~26Gb. Option 1: Save query results to a temp table Export table to csv(s) Bulk upsert to postgres (This will be slow) Option 2: Somehow get the two DBs to speak directly I don't know if this is possible Thank you for any information!!! 回答1: This BigQuery Foreign Data Wrapper for postgreSQL allows you to query BigQuery directly from within PostgreSQL. Using

Export query results from BigQuery to Postgres

江枫思渺然 提交于 2021-02-07 19:59:52
问题 I am trying to export the results of a query in BigQuery, and get the data into Postgres. The data may be as much 250 million record, ~26Gb. Option 1: Save query results to a temp table Export table to csv(s) Bulk upsert to postgres (This will be slow) Option 2: Somehow get the two DBs to speak directly I don't know if this is possible Thank you for any information!!! 回答1: This BigQuery Foreign Data Wrapper for postgreSQL allows you to query BigQuery directly from within PostgreSQL. Using

RANGE PRECEDING is only supported with UNBOUNDED

此生再无相见时 提交于 2021-02-07 19:59:51
问题 I want to try avg() aggregation within a time window sql code select user_id,timestamp avg(y) over(range between '5 second' preceding and '5 second' following), from A but the system report error RANGE PRECEDING is only supported with UNBOUNDED Is there any method to implement, say, a 10 second window for avg() window function? frame of window function is as wide as range from n seconds preceding the timestamp of current row and m seconds following the timestamp of current row 回答1: RANGE