SORU
17 HAZİRAN 2009, ÇARŞAMBA


PostgreSQL - max "parametre sayısı" tümcesi?

Bu Google için çok zor bir soru, umarım birileri bana yardım edebilir. İsim, fıkra gibi: bir belirtebilirsiniz

SELECT * FROM user WHERE id IN (1000, 1001, 1002)

Herkes parametreleri maksimum sayı ne olduğunu içine geçebilir mi?

Teşekkürler.

CEVAP
18 HAZİRAN 2009, PERŞEMBE


Kaynak kodu bulunan göre here, starting at line 850, PostgreSQL açıkça bağımsız değişken sayısı sınırı yok.

Aşağıdaki satırı 870: kod bir yorum

/*
 * We try to generate a ScalarArrayOpExpr from IN/NOT IN, but this is only
 * possible if the inputs are all scalars (no RowExprs) and there is a
 * suitable array type available.  If not, we fall back to a boolean
 * condition tree with multiple copies of the lefthand expression.
 * Also, any IN-list items that contain Vars are handled as separate
 * boolean conditions, because that gives the planner more scope for
 * optimization on such clauses.
 *
 * First step: transform all the inputs, and detect whether any are
 * RowExprs or contain Vars.
 */

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Dellbear816

    Dellbear816

    4 Mart 2008
  • FUNKER530 - Veteran Community & Combat Footage

    FUNKER530 -

    25 Ocak 2007
  • Joe DiFeo

    Joe DiFeo

    7 AĞUSTOS 2012