postgres talking back on queries again

Peter Haworth pete at lcsql.com
Sun May 12 11:55:43 CDT 2013


Sounds like you somewhere issued a BEGIN and then stopped processing
without a ROLLBACK or COMMIT, maybe while debugging and stopping part way
through a handler.  The INSERT in psql works because you don't have that
situation.  Try issuing a COMMOT or ROLLBACK from the message box then try
the INSERT again.

Pete
lcSQL Software <http://www.lcsql.com>


On Sat, May 11, 2013 at 5:01 PM, Dr. Hawkins <dochawk at gmail.com> wrote:

> I have an open database debtorDb of 11.  I have a text window with psql
> running on the same database.  uniq_sfky is
>
> psql likes my query:
> dhbk_dbtrs=# INSERT INTO try1_____________001_sofa  VALUES(DEFAULT)
> RETURNING uniq_sfky;
>  uniq_sfky
> -----------
>          9
> (1 row)
>
> INSERT 0 1
> dhbk_dbtrs=#
>
>
> Livecode does not:
>
> put "INSERT INTO " & dhtbl_sofa & "  VALUES(DEFAULT)  RETURNING uniq_sfky;"
> & return into dcmd
> put dcmd
>
> shows
>
> INSERT INTO try1_____________001_sofa  VALUES(DEFAULT)  RETURNING
> uniq_sfky;
>
> --the exact same query (well, I did cut & paste!)
>
> Then using this in a couple of ways
>
>          put revDataFromQuery(tab,vtab,debtordb,dcmd) into theRes
>          put theRes
> yields
>          revdberr,ERROR:  current transaction is aborted, commands ignored
> until end of transaction block
>
>
> Then also trying,
>          put revdb_execute(debtorDb,dcmd, res1, res2, res3)into theRes
>          put theRes
>
> yields the same error message
>
>
> Originally, I had these inside BEGIN/COMMIT, but couldn't make sense out of
> the errors.
>
> This seems to be valid postgres, and works in psql (which is a minimal
> wrapper, I believe).
>
> What is going on here?
> --
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


More information about the use-livecode mailing list