Re: [GENERAL] building extension with large string inserts

2017-07-05 Thread Tom van Tilburg
You are right! I totally forgot about this dollar quoting :) Typically one of those things you will only remember the hard way ;-) Thanks a lot, Tom On Wed, Jul 5, 2017 at 5:08 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Tom van Tilburg <tom.van.tilb...@gmail.com> writes

Re: [GENERAL] building extension with large string inserts

2017-07-05 Thread Tom van Tilburg
, Tom Lane <t...@sss.pgh.pa.us> wrote: > Tom van Tilburg <tom.van.tilb...@gmail.com> writes: > > I am trying to build an extension where there is the need to insert large > > strings consisting of javascript code. > > ... > > What would be a proper way to g

[GENERAL] building extension with large string inserts

2017-07-05 Thread Tom van Tilburg
I am trying to build an extension where there is the need to insert large strings consisting of javascript code. The easiest way to get these string currently into a table is by using \set varname `cat mycode.js` INSERT INTO mytable VALUES (:'varname'); and run this from the psql client. psql

Re: [GENERAL] inconsistent behaviour of set-returning functions in sub-query with random()

2016-09-27 Thread Tom van Tilburg
at stackexchange. thanks, Tom On Mon, 26 Sep 2016 at 21:38 Tom Lane <t...@sss.pgh.pa.us> wrote: > Tom van Tilburg <tom.van.tilb...@gmail.com> writes: > > I'm often using the WHERE clause random() > 0.5 to pick a random subset > of > > my data. Now I noticed that wh

[GENERAL] inconsistent behaviour of set-returning functions in sub-query with random()

2016-09-26 Thread Tom van Tilburg
Hi List, Note beforehand: this question is a result of a stack-exchange that can be seen here: http://stackoverflow.com/questions/39624241/inconsistent-behaviour-of-set-returning-functions-in-sub-query-with-random I'm often using the WHERE clause random() > 0.5 to pick a random subset of my