postgresql-9.2

    1熱度

    3回答

    你能幫我與下面的語法錯誤 列引用「ID」是不明確的是我得到的錯誤。 insert into table1 (id, name, type, version) select id, '<needs updating>' as name, 'external' as type, -1 as version from table2 left outer join table1 on table2

    0熱度

    1回答

    我使用下面的查詢 select distinct throttle_id, array_accum(param) over (partition by throttle_id) as script_exclude from throttle_data where exclude = 't' and valve_type = 513 and throttle_id = 1270571881 ,我

    1熱度

    2回答

    我嘗試在200列的表中加載50000行。每1000行我做executeBatch()。我得到這張桌子的鎖。相同的代碼適用於MS SQL和Oracle,但postgresql我遇到此問題。當我將executeBatch數字從1000減少到75時,所有工作都正常。 配置文件中是否有任何參數響應批緩衝區大小? 同樣的問題http://www.postgresql.org/message-id/[emai

    0熱度

    1回答

    我使用紅帽6 的Postgres 9.2,這應該是簡單的,但我不能在任何地方找到一個Postgres的表空間的位置存儲。我找數據庫表和列存儲的Postgres的表空間的位置,我認爲這將是在PG_TABLESPACE,但 select * from pg_tablespace 顯示... postgres=# select * from pg_tablespace; spcname

    0熱度

    1回答

    我想創建搜索Postgres裏 AddressBook (pid, tag, address1, address2, city, stateProv, postalCode, ...) 申請地址簿當我輸入一些字符串到搜索提交我想從所有表列獲得所有可用的數據。這種情況下適當的SQL查詢是什麼?

    1熱度

    1回答

    PostgresQL允許您插入兩個列表,一個字段名稱,另一個值。 INSERT INTO products (product_no, name, price) VALUES (1, 'Cheese', 9.99); 對於長列表,很難弄清楚你正在使用哪個列表索引。有沒有辦法通過指定列名旁邊的值來插入,即鍵值對?注意:這與hstore不同。 即。 INSERT INTO products (pro

    0熱度

    2回答

    我有兩個表,table_a和table_b,如下所示。 表table_a: a_id |columna |varchar1|varchar2|varchar3 ---------------------------------- | 1 | a | Medium | High | n/a | 2 | b | Low | n/a | n/a | 3 | c | Medium | Low

    2熱度

    3回答

    我有一個變量'x',它是staging表中的varchar,但它在目標表中被設置爲布爾值,它具有'true'和'false'值。如何將varchar轉換爲postgresql中的布爾值?

    0熱度

    1回答

    使用PostgreSQL 9.2.8,我試圖從一個數據庫恢復只是我的數據到另一個,但觸發器似乎仍在運行。我已經編寫了如下所示的腳本來完成副本。 基本上我有dts作爲我的生產數據庫,而我有DigitalTrafficSystem作爲我的開發數據庫。表結構是相同的,但開發人員有非常不同的存儲過程。 當還原運行時,DigitalTrafficSystem數據庫結束時有一堆額外的錶行,dts數據庫中不存在

    0熱度

    1回答

    以下條件插入僅在項目已存在時才起作用! (不會試圖插入)。 如果該項不存在,我會得到重複密鑰違規(重複密鑰違反唯一約束)! 使用PostgreSQL 9.2 INSERT INTO mytable (mytable_handle, title, description) select '1234/9876', 'Title here', 'description here' from myta