postgresql non public Schemas rowSet.SaveRow error.

Var myDB As New PostgreSQLDatabase
myDB.Host = “localhost”
myDB.Port = 5432
myDB.UserName = “postgres”
myDB.Password = “r4v4f7”
myDB.DatabaseName = “agentbox”

Var strSql As String = “select * from gat1400.ga_log order by gl_id limit 1”
Var rs As RowSet = myDB.SelectSQL(strSql)
rs.Column(“gl02”).StringValue = “test”

Catch e As DatabaseException
Print e.Message
End Try[/code]

ERROR: relation "ga_log" does not exist LINE 1: UPDATE ga_log SET gl02 = $1 WHERE gl_id = '1'
How To Resolve?

Probably the capitalization of that table name (“ga_log”) is somehow different (“ga_Log” maybe?) See:
Oh, and I see that you are using schema-qualified table names (which is a good thing) and I wonder if you overtax Xojo’s DB API’s ability to handle these properly (never used it much, so I can’t tell). You might be better off using prepared statements where you can specify the table name explicitly.

Yeah, that’s what I was wondering too. Probably should file a bug report.

As to a workaround, do as Maximilian suggests - issue the update directly with a prepared statement. API 2 makes it easy to do with one line:

myDB.ExecuteSQL("update gat1400.ga_log set g102=? where gl_id=?", "test", rs.Column("gl_id"))

You are both right, the Recordset.Edit … .Update interface does not support schemas since ever. This is being tracked in <> And obviously the bug was carried over to RowSet.EditRow … .SaveRow as well. Constructing the DML statements yourself does work with schema qualified table names, thus.

Ah, I see that this bug report recently celebrated its 10th birthday. Looks like it will be around for yet another while.

It’s not easy to persist for 10 years.