postgresql

    0热度

    1回答

    我发现PostgreSQL类似于运营商的作品有点奇怪。我不小心检查了下面查询中的空间,但对结果感到惊讶。 select 'Device Reprocessing' similar to '%()%' --return true select 'Device Reprocessing' similar to '%()%' --return true select 'DeviceReprocessin

    -1热度

    1回答

    将部分Postgres转出部分会生成30GB +的部分。这些文件在Windows 2008服务器上登陆。我试图计算csv中的行数,以确保我有一个我期望的行数(22,725,303是确切的)。我可以计算我希望转储的那一部分的行数 - 但我不确定是否将所有行都计算在内。 这是一张190万行的表格,所以表格的各个部分是要走的路。 那么我该如何计算行数,以便知道我已经得到了整个部分?

    0热度

    1回答

    ERROR: structure of query does not match function result type DETAIL: Returned type double precision does not match expected type integer in column 1. CONTEXT: PL/pgSQL function get_analysis1_data(dat

    0热度

    1回答

    试图选择带有书架和连字符号的列。我的db是postgresql。在knex,我不喜欢这样写道: knex('client_users') .select( 'client_user_id as id', 'status', 'email', 'last_login_date as lastLoginDate', knex.raw(

    0热度

    2回答

    我有以下查询...... CourseRegistration.where(status: "Completed").where("score >= ?", "80") 首先,是的,比分字段是一个数据库中的字符串。然而,这[主要]作品中,有100个没有被返回。我可以查询.where("score >= ?", "080"),它确实按照我的意愿返回了80-100分的所有分数,但它的确感觉不错。还

    0热度

    2回答

    我TABLE_A mode bank_id amount 'Outgoing' 1 100 'Incoming' 1 200 'Outgoing' 1 300 'Incoming' 2 200 我需要把它变成 from_bank_id to_bank_id amount 1 null 100 null 1

    0热度

    2回答

    我试图选择公司和日期不同的数据类型/ ID的数据表中的数据。 换句话说,我想company_id, dates_id, daily_val其中wh_calc_id = 344如果相同company_id/dates_id组合不存在其中wh_calc_id = 368。 我松散下面这个例子: Select rows which are not present in other table 这些都是我

    1热度

    1回答

    我正在运行PostgreSQL 9.3。我有一个名为“model”的列“json”(而不是 jsonb)。 “模型”列的内容如下所示: { "section": { "colors": ["red", "blue", "green"] } } 是否可以查询,其中包含model -> section -> colors“蓝色”行?

    0热度

    1回答

    创建物化视图 “mviews_price2” id - Integer price - Integer price2 - Integer unit_price - Integer location_site_id - Integer leave_site_id - Integer web - Boolean category_id - Integer

    1热度

    1回答

    我想知道默认Postgres数据库的版本。如何使用Django查找它?