2nd Followup: It turns out that loading a table from a JSON string is more
complicated than going from a table to JSON, perhaps for good reason.
There does not appear to be a direct inverse to the row_to_json() function,
but it wasn't difficult for me to write a PHP program that takes the JSON
fil
"Bannert Matthias" writes:
> [ very deep stack of parser transformExprRecurse calls ]
> #20137 0x7fe7fb80ab8c in pg_analyze_and_rewrite
> (parsetree=parsetree@entry=0x7fe7fffdb2a0,
> query_string=query_string@entry=0x7fe7fdf606b0 "INSERT INTO
> ts_updates(ts_key, ts_data, ts_frequency) VA
Christoph Berg writes:
> I don't see how log_line_prefix() would make sense, but
> pg_session_identifier() (= %c) would make sense to have, in the same
> way that we have pg_backend_pid(), so the current session could be
> located in the logs. (Not sure if pg_session_identifier shouldn't also
> be
I was able to try it on a test server, the combination of row_to_json() and
json_strip_nulls() worked exactly as I had hoped. Stripping nulls reduced
the JSON file by over 50%. (The data I needed to export has around 900,000
rows, so it gets quite large.)
I've got a test file I can make available
On 04/09/2016 01:30 AM, Durumdara wrote:
Dear Everybody!
In MS we had a "persistent lock" structure and method.
This over transactions because based on real records in a real table
with pri key (tablename + id).
For garbaging we had a special session info.
In MS the session id is smallint, so
On 04/09/2016 12:00 AM, durumd...@gmail.com wrote:
Dear Everybody!
See this sampe:
StartTrans;
try
Update1;
Insert1;
Update2; // this cause error f.e.
Commit;
except
AnyChecks;
Rollback;
When Update2 causes error, AnyChecks comes.
In other databases I can do any
Re: Stephen Frost 2016-04-09 <20160409115712.gt10...@tamriel.snowman.net>
> > Btw, what you are describing is exactly what %c in log_line_prefix
> > does.
>
> That's not currently exposed at an SQL level anywhere though, is it?
> Perhaps we should add a way to get that. Another thought would be t
* Christoph Berg (c...@df7cb.de) wrote:
> Re: Durumdara 2016-04-09
>
> > In MS the session id is smallint, so it can repeats after server restarts,
> > but my coll. found a "session creation timestamp".
> > This is a key which unique.
> > With this we can check for died sessions and we can clean
Dear John!
This is not about MS.
This is about: how to get unique session_id. This could be "pid" + "client
starting time".
The pid isn't unique, where I can get "client's starting time"?
But I think the solution is pg_activity view.
There is no same PID as mine, because no one have same subpro
Greetings,
* Durumdara (durumd...@gmail.com) wrote:
> Where I can get timestamp or some other unique data with I can create a
> combined primary key?
Not entirely sure about the rest of it, but if you want backend start
time, you can look at pg_stat_activity (which also happens to have the
pid).
On 4/9/2016 1:30 AM, Durumdara wrote:
In MS we had...
If you want Microsoft's unique version of SQL, run Microsoft SQL. That
stuff you describe is a whole bunch of implementation specific wierdness
from the standpoint of someone outside, looking in..
--
john r pierce, recycling bits in s
Re: Durumdara 2016-04-09
> In MS the session id is smallint, so it can repeats after server restarts,
> but my coll. found a "session creation timestamp".
> This is a key which unique.
> With this we can check for died sessions and we can clean their records.
>
> We want create same mechanism.
>
Dear Everybody!
In MS we had a "persistent lock" structure and method.
This over transactions because based on real records in a real table with
pri key (tablename + id).
For garbaging we had a special session info.
In MS the session id is smallint, so it can repeats after server restarts,
but
On Saturday, April 9, 2016, durumd...@gmail.com wrote:
> Dear Everybody!
>
>
> See this sampe:
>
> StartTrans;
> try
> Update1;
> Insert1;
> Update2; // this cause error f.e.
> Commit;
> except
> AnyChecks;
> Rollback;
>
> When Update2 causes error, AnyChecks comes.
>
> In
Dear Everybody!
See this sampe:
StartTrans;
try
Update1;
Insert1;
Update2; // this cause error f.e.
Commit;
except
AnyChecks;
Rollback;
When Update2 causes error, AnyChecks comes.
In other databases I can do anything in that point, because Update and
Insert 1 stored i
15 matches
Mail list logo