Re: table value function help

2018-11-22 Thread Glenn Schultz
Thanks! I googled this for 3-days before coming here. I see what you mean. Thank you so much will make the recommended changes. Glenn On Thu, Nov 22, 2018 at 11:02 AM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Thursday, November 22, 2018, Glenn Schultz wrote: > >> Hello, >>

Re: table value function help

2018-11-22 Thread David G. Johnston
On Thursday, November 22, 2018, Glenn Schultz wrote: > Hello, > > I have a table value function and would like the first and second input to > take multiple arguments (array or list) I suppose. Like the below: > create or replace function myfunction(sector, agency, term) > Create function myfun

Re: table value function help

2018-11-22 Thread Adrian Klaver
On 11/22/18 8:25 AM, Glenn Schultz wrote: Hello, I have a table value function and would like the first and second input to take multiple arguments (array or list) I suppose.  Like the below: I cannot follow what you are trying to achieve. create or replace function myfunction(sector, age

Re: Compile postgresql libraries with VS17

2018-11-22 Thread Tom Lane
=?UTF-8?B?w4Fkw6FtIE1hcmFjc2th?= writes: > I would like to ask you whether is it possible to compile the PostgreSQL > 9.6.5 version with VS17? Looking at our git history, patches to make that work cleanly were added in 9.6.6. regards, tom lane

table value function help

2018-11-22 Thread Glenn Schultz
Hello, I have a table value function and would like the first and second input to take multiple arguments (array or list) I suppose. Like the below: create or replace function myfunction(sector, agency, term) returns table (cusip char(9), sector char(12)) language sql stable as $function$ sele

Compile postgresql libraries with VS17

2018-11-22 Thread Ádám Maracska
Hi, I would like to ask you whether is it possible to compile the PostgreSQL 9.6.5 version with VS17? I did not find anything against it, but I would like to have a definitive answer if it is possible. Thank you very much, Best Regards, Adam

Re: a bug jsonb?

2018-11-22 Thread Josef Šimánek
the order is changed as well on your screenshot čt 22. 11. 2018 v 16:23 odesílatel Станислав Губанов napsal: > I think yes. > Please look at this screen shot > order of key in json not changed in pgAdmin, maybe exists some option for > turn on/off this feature. > > [image: image.png] > > чт, 22 н

Re: a bug jsonb?

2018-11-22 Thread Francisco Olarte
On Thu, Nov 22, 2018 at 3:59 PM Станислав Губанов wrote: > order of key in json is changed in such query: > SELECT json_data FROM test_json; > expected result: {"rootC":{},"rootB":{},"rootZ":{},"rootA":[]} > actual result: {"rootA": [], "rootB": {}, "rootC": {}, "rootZ": {}} >From https://ww

Re: a bug jsonb?

2018-11-22 Thread Josef Šimánek
If I understand well your question, this is expected with JSONB. see https://www.postgresql.org/docs/current/datatype-json.html for more info: ...jsonb does not preserve white space, does not preserve the order of object keys, and does not keep duplicate object keys. If duplicate keys are specifi

a bug jsonb?

2018-11-22 Thread Станислав Губанов
Hello! I'd like to clarify, if this a bug or a feature simple JSON {"rootC":{},"rootB":{},"rootZ":{},"rootA":[]} Table for data create table test_json (json_data jsonb); put json into table INSERT INTO test_json (json_data) VALUES ('{"rootC":{},"rootB":{},"rootZ":{},"rootA":[]}'); order of key

Re: Invoking user of the function with SECURITY DEFINER

2018-11-22 Thread Laurenz Albe
Madan Kumar wrote: > How to get the user who is invoking the function with SECURITY DEFINER? > When we define the function to be SECURITY DEFINER, it will execute in the > context of the user who created it. Let's say I've given execute permission > for this function to other users and wish to kno

Invoking user of the function with SECURITY DEFINER

2018-11-22 Thread Madan Kumar
Hi, How to get the user who is invoking the function with SECURITY DEFINER? When we define the function to be SECURITY DEFINER, it will execute in the context of the user who created it. Let's say I've given execute permission for this function to other users and wish to know who is executing it.

Re: Empty Range Bound Specified for Partition

2018-11-22 Thread ramsiddu007
Thank you for the clarification. On Thu, 22 Nov 2018 at 13:30, Alban Hertroys wrote: > > > On 22 Nov 2018, at 7:21, ramsiddu007 wrote: > > > > pgsql> create table test_upto_100 partition of test_parent_partition > > for values from ('51') to ('100'); > > > >It was

Re: Empty Range Bound Specified for Partition

2018-11-22 Thread Alban Hertroys
> On 22 Nov 2018, at 7:21, ramsiddu007 wrote: > > pgsql> create table test_upto_100 partition of test_parent_partition > for values from ('51') to ('100'); > >It was showing error like this.. > > ERROR: empty range bound specified for partition "test_upto_100" >