mirror of
https://github.com/levinsv/pgadmin3.git
synced 2026-05-15 06:05:49 -06:00
add quote_ident
This commit is contained in:
parent
b1f67cbee8
commit
5defc3b12a
2 changed files with 2 additions and 2 deletions
|
|
@ -2017,7 +2017,7 @@ void ctlSQLBox::OnAutoComplete(wxCommandEvent &rev)
|
|||
sch = " and relnamespace =" + qtConnString(sch) + "::regnamespace";
|
||||
}
|
||||
if (tabn[0] == '"') tabn.Replace("\"", ""); else tabn = tabn.Lower();
|
||||
wxString sql2 = wxT("select string_agg(a.attname,E'\t') from pg_attribute a where a.attrelid = (select oid from pg_class p where relname=") + qtConnString(tabn) + sch
|
||||
wxString sql2 = wxT("select string_agg(quote_ident(a.attname),E'\t') from pg_attribute a where a.attrelid = (select oid from pg_class p where relname=") + qtConnString(tabn) + sch
|
||||
+ wxT(") and a.attisdropped IS FALSE and a.attnum>=0 ") + flt
|
||||
+ wxT("");
|
||||
//pgSet *res = m_database->ExecuteSet(sql);
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ void TableColsMap::BuildMapTableColumnsToSQLexp(Table *reltab, const wxString &a
|
|||
int ncol = tmp[c].relcol;
|
||||
if (ncol < 1) continue;
|
||||
tab_col_struct fnd = { rel,ncol };
|
||||
wxString sqlname = tmp[c].name;
|
||||
wxString sqlname = qtIdent(tmp[c].name);
|
||||
if (!alias.IsEmpty()) sqlname = alias + "." + sqlname;
|
||||
map.insert({fnd,sqlname});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue