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查找它?