## Guyren Howe (guy...@gmail.com):
> I am inclined to advise folks to use PL/V8 on Postgres, because it is
> a reasonable language, everyone knows it, it has good string functions,
> decent performance and it tends to be installed everywhere (in particular,
> Amazon RDF offers it).
I'd be careful
## Mike Sofen (mso...@runbox.com):
> I look at this from the opposite direction: with a stable database
> API (via stored procs), I can change the schema and logic within the
> procs without causing any app code breakage…the app tier is completely
> insulated from those changes – that’s worth a lo
## Karsten Hilbert (karsten.hilb...@gmx.net):
> > Many applications are not designed to have a "stable" database API.
> It seems OP is arguing they should.
Well, if the environment allows for that, fine. If not, well, duh.
Regards,
Christoph
--
Spare Space
--
Sent via pgsql-general mailing
## John R Pierce (pie...@hogranch.com):
> that reason code doesn't sound like anything PostgreSQL generates.
> SQLSTATE 40001 is "serialization_failure", but all that stuff about
> 'identification as a pivot' ?that must be your ORM.
That's PostgreSQL: https://wiki.postgresql.org/wiki/SSI
Reg
## Christopher Molnar (cmolna...@gmail.com):
> I have tried something like:
>
> update pcilms_assign set intro=regexp_replace(intro, '/([^/]*)\" title=$',
> '&files=\1') where intro like '%https://owncloud.porterchester.edu%' and
> course=18 and id=55413;
http://blog.codinghorror.com/parsing-ht
## Melvin Davidson (melvin6...@gmail.com):
> UPDATE pcilms_assign
>SET intro = REPLACE (intro, 'HVACR1114_LAB_13A.pdf',
> '&file=HVACR1114_LAB_13A.pdf')
> WHERE intro like 'https://owncloud.porterchester.edu%'
> AND course=18 and id=55413;
Unfortunately, that tries to do the right th
## Alex Ignatov (a.igna...@postgrespro.ru):
> My question is: is there any option(s) to log non-default
> postgresql.conf values to log file?
Depending on your use case, I'd start with a simple query:
SELECT name, setting FROM pg_settings WHERE source <> 'default'
Wrap that in a COPY, or perhaps
## sighup (r...@sighup.eu):
> How can I extract the value of the 'items' key either as two rows and or
> a sum of both.
select id, jsonb_array_elements(markers)->>'items' from data;
And as jsonb_array_elements() returns a setof jsonb:
with tab(id, items) as (
select id, (jsonb_array_elements(m
## Cameron Smith (csm...@stereodllc.com):
> t:2016-05-19 01:14:51.668 UTC d= p=144 a=PANIC: could not create replication
> identifier checkpoint "pg_logical/checkpoints/8-F3923F98.ckpt.tmp": Invalid
> argument
> t:2016-05-19 01:14:51.671 UTC d= p=9729 a=WARNING: could not create
> relation-ca
Hi,
> There is a set of creation functions for json, such as:
>
> to_json(anyelement)
>
> There doesn't seem to be any equivalent functions for converting text to
> jsonb.
>
> Is there a way to do this?
You can always cast json to jsonb:
test_db=# create table t (a integer primary key, b json
## p...@mailme.dk (p...@mailme.dk):
> Is it already possible or would you consider a configuration option that
> would only replicate DML but not DDL ?
bdr.skip_ddl_replication = true
can even be set at transaction level
Regards,
Christoph
--
Spare Space
--
Sent via pgsql-general mailing li
## Robert Sosinski (rsosin...@ticketevolution.com):
> When using array_agg on a large table, memory usage seems to spike up until
> Postgres crashes with the following error:
This sounds like bug #7916.
http://www.postgresql.org/message-id/e1uceeu-0004hy...@wrigleys.postgresql.org
As noted in tha
## Thomas Güttler (guettl...@thomas-guettler.de):
> Is running linux with postgres on eMMC a bad idea in general?
I'd say that running anything with a read-write load on eMMC will
end in pieces. It's ok to occasionally write something, but a mixed
load is not really what these things were design
## Egon Frerich (e...@frerich.eu):
> Why are there 0 rows? I expect 3 rows:
>From your results I guess that sp3 IS NULL on the three rows where
it is not 'j'. You should use the correct comparison predicate for
this case, i.e. IS DISTINCT FROM instead of <>.
https://www.postgresql.org/docs/9.6/st
## vod vos (vod...@zoho.com):
> How to define the exact limit length of numeric type? For example,
>
> CREATE TABLE test (id serial, goose numeric(4,1));
>
> 300.2 and 30.2 can be inserted into COLUMN goose, but I want 30.2
> or 3.2 can not be inserted, how to do this?
testing=# CREATE TABLE
## Igor Korot (ikoro...@gmail.com):
> std::string query1 = "DECLARE alltables CURSOR SELECT
> table_schema, table_name FROM information_schema.tables WHERE
> table_type = 'BASE TABLE' OR table_type = 'VIEW' OR table_type =
> 'LOCAL TEMPORARY';";
> [quote]
> RROR: syntax error at or near "SEL
## Igor Korot (ikoro...@gmail.com):
> Another question - do I have to do "DECLARE CURSOR..." or I can just write
> a normal SELECT query?
> For this I followed and example on the libpg page...
Yes. In fact, "libpq Example Program 3" on
https://www.postgresql.org/docs/current/static/libpq-example.
## Hans Schou (hans.sc...@gmail.com):
> Example of usage:
> psql pgsql://joe:p4zzw...@example.org:2345/dbname
Make the scheme "postgresql" and you're here:
https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING
"32.1.1.2. Connection URIs".
Regards,
Christoph
--
Sp
## Igor Korot (ikoro...@gmail.com):
> >> Is "IF" operator not supported by PostgreSQL
> So how do I write this properly?
There is documentation for that:
https://www.postgresql.org/docs/current/static/sql-createindex.html
Regards,
Christoph
--
Spare Space
--
Sent via pgsql-general mailing l
## Johann Spies (johann.sp...@gmail.com):
> --
> 2017-08-24 19:23:26 SAST [7532-18] LOG: server process (PID 4890) was
> terminated by signal 9: Killed
That looks like out-of-memory. Check the kernel log/dmesg to verify.
If it's the dreaded OOM-killer, you should check your over
## Ron Johnson (ron.l.john...@cox.net):
> Everything I've read says that you should use "rsync -a". Is there
> any reason why we can't/shouldn't use "rsync -az" so as to reduce
> transfer time?
On today's LANs, total archiving time is dominated by connection
startup time (how long does it take t
## Ron Johnson (ron.l.john...@cox.net):
> > On today's LANs, total archiving time is dominated by connection
> > startup time (how long does it take to transfer 16MB on a 10GbE link?
> > See...).
>
> And if we've only got a WAN link from one DC to another 360 miles away?
Well... TCP handshake wi
## Ron Johnson (ron.l.john...@cox.net):
> How is this done in v8.4? (I tried adding "date; rsync ..." but pg
> didn't like that *at all*.)
There's a DEBUG1-level log message on successful archive_command
completion - that would give you a lot of other low-prio log
messages wich you probably don'
## Stephen Frost (sfr...@snowman.net):
> Worse, such scripts run the serious risk of losing WAL if a crash
> happens because nothing is ensuring that the WAL has been sync'd to disk
> before returning from the archive_command.
That risk already exists when using rsync/scp/scp/... and should be
mi
## Ron Johnson (ron.l.john...@cox.net):
> > I'd put a wrapper around your rsync (a short shell script
> > would be sufficient) in the lines of rsync ... && logger "done",
> > that way you'd get the information via syslog.
>
> And if logging to stderr?
In that case your original approach could ha
## Eric Lamer (eric.la...@intact.net):
> I can do something like:
>
>Select * From logs Where src_ip IN (Select ip from ip_table where zone
> = 'ZONE_a');
>
>Of course that does not work since it does not work with Inet type and
> I cannot use << because I have more than 1 row return
26 matches
Mail list logo