[GENERAL] Track changes to function code

2014-07-21 Thread Rebecca Clarke
Hi all, At present when a function is being edited we keep note of when and by who within comments in the function's code. Is there, or can anyone recommend, any open source software that tracks function activity when it comes to edits (not executions)? I tried searching on the web, but all I fin

Re: [GENERAL] Track changes to function code

2014-07-21 Thread Jacob Bunk Nielsen
Rebecca Clarke writes: > At present when a function is being edited we keep note of when and > by who within comments in the function's code. That sounds cumbersome. > Is there, or can anyone recommend, any open source software that > tracks function activity when it comes to edits (not executi

Re: [GENERAL] Track changes to function code

2014-07-21 Thread Pavel Stehule
Hi 2014-07-21 14:36 GMT+02:00 Jacob Bunk Nielsen : > Rebecca Clarke writes: > > > At present when a function is being edited we keep note of when and > > by who within comments in the function's code. > > That sounds cumbersome. > > > Is there, or can anyone recommend, any open source software t

Re: [GENERAL] Track changes to function code

2014-07-21 Thread Rebecca Clarke
Thanks guys. I'll check that out. On Mon, Jul 21, 2014 at 2:12 PM, Pavel Stehule wrote: > > Hi > > 2014-07-21 14:36 GMT+02:00 Jacob Bunk Nielsen : > > Rebecca Clarke writes: >> >> > At present when a function is being edited we keep note of when and >> > by who within comments in the function

Re: [GENERAL] check database integrity

2014-07-21 Thread Tom Lane
=?ISO-8859-1?Q?Torsten_F=F6rtsch?= writes: > Another question, just out of curiosity, for vm and main forks I use > pg_relation_size to figure out the highest page number. That does not > work for fsm. I have at least one fsm file that it 24 kb. Fetching page > 0 works, page 1 and above gives an e

Re: [GENERAL] statement_timeout doesn't work

2014-07-21 Thread Sergey Konoplev
On Fri, Jul 18, 2014 at 6:15 PM, David G Johnston wrote: >> query | BEGIN; >> SET LOCAL statement_timeout TO 1000; >> DROP INDEX public.idx1; >> ALTER INDEX public.idx2 RENAME TO idx1; >> END; > > If I read this correctly you sent the entire begin...end as a single > compound statement and

[GENERAL] cursor return null

2014-07-21 Thread Ramesh T
Hello, in postgres function (id bigint ),the following code not return any value with artNums ,But when i do select statement ony it's output the values with out include cursor i.e,cursor problem ..? please let me know what should i do to getvalues from cursor, but i dont where i mis

[GENERAL] Need r_constraint_name

2014-07-21 Thread Ramesh T
Hi, In oracle got constraint details using user_constraint, But in postgres how to get the r_constraint_name,constraint_name of the particular table...? mainly i need r_constraint_name on table.. how to get it?please let me know

Re: [GENERAL] giving a user permission to kill their processes only

2014-07-21 Thread Jakub Jindra
I was looking for solution like this. Actually I made a few changes proposed by Robert Treat: * SESSION_USER insetead of CURRENT_USER * Added filter for username and procpid from pg_stat_activity Alternatively you can create similar function for pg_terminate_backend - it pid's terminates backend c

[GENERAL] Referencing serial col's sequence for insert

2014-07-21 Thread Anil Menon
Hi, I have a question on the right/correct practice on using the serial col's sequence for insert. Best way of explanation is by an example: create table id01 (col1 serial, col2 varchar(10)); insert into id01(col2) values ( 'data'||currval('id01_col1_seq')::varchar); while I do get what I want

[GENERAL] postgres_fdw - IS TRUE/FALSE conditions are not pushed down

2014-07-21 Thread Sergiy Zuban
Hi I've setup foreign table and noticed inconsistency how conditionals handled for boolean columns. explain verbose select * from temporary_testing.t_proxied where active is true; QUERY PLAN ---

[GENERAL] postgres_fdw - push down conditionals for ENUMs

2014-07-21 Thread Sergiy Zuban
Hi It's well known that pushing down of WHERE conditions supported for built-in data types, operators and functions only. So if your main table has columns declared with custom domain (CREATE DOMAIN ID_TYPE AS INT NOT NULL) and you want just to proxy all queries over FDW foreign table needs to be

Re: [GENERAL] postgres_fdw - IS TRUE/FALSE conditions are not pushed down

2014-07-21 Thread Tom Lane
Sergiy Zuban writes: > DO I need to report this as bug? It's not a bug, but an unimplemented feature. A patch submission would be more likely to get you somewhere. Look into contrib/postgres_fdw/deparse.c, and add support for BooleanTest (the NullTest support is a good model).

Re: [GENERAL] postgres_fdw - push down conditionals for ENUMs

2014-07-21 Thread Tom Lane
Sergiy Zuban writes: > 1. Is there any plans to add "non-strict mode" (configurable via options on > server/table/column level) to allow pushing down conditions for all data > types? No. You might as well call it a "return random answers" mode. > 2. There is an option that allows to map foreign

Re: [GENERAL] statement_timeout doesn't work

2014-07-21 Thread David G Johnston
Sergey Konoplev-2 wrote > On Fri, Jul 18, 2014 at 6:15 PM, David G Johnston > < > david.g.johnston@ > > wrote: >>> query | BEGIN; >>> SET LOCAL statement_timeout TO 1000; >>> DROP INDEX public.idx1; >>> ALTER INDEX public.idx2 RENAME TO idx1; >>> END; >> >> If I read this correctly you se

Re: [GENERAL] cursor return null

2014-07-21 Thread David G Johnston
rameshparnanditech wrote > Hello, >in postgres function (id bigint ),the following code not return > any value with artNums ,But when i do select statement ony it's output > the > values with out include cursor > > i.e,cursor problem ..? > > please let me know what should i do to ge

Re: [GENERAL] Why would I need to explicitly cast a string literal to text?

2014-07-21 Thread David G Johnston
Derek Poon-2 wrote > As an exercise, I've written the following query to implement > [FizzBuzz][1]. > > SELECT COALESCE(fizz || buzz, fizz, buzz, '' || n) AS fizzbuzz > FROM ( > SELECT n0 + 3 * n3 + 9 * n9 + 27 * n27 + 81 * n81 AS n > FROM >

Re: [GENERAL] statement_timeout doesn't work

2014-07-21 Thread Sergey Konoplev
On Mon, Jul 21, 2014 at 10:16 AM, David G Johnston wrote: >> So, If I separate the commands everything will will work as expected, >> correct? > > I would assume so. > > If you wait to send the DROP/ALTER index commands until the SET LOCAL > command returns successfully then both of those commands

Re: [GENERAL] Why would I need to explicitly cast a string literal to text?

2014-07-21 Thread Kevin Grittner
Derek Poon wrote: > LEFT OUTER JOIN > (SELECT 3 AS fizzstep, CAST('Fizz' AS CHAR(4)) AS fizz) AS >Fizz > ON n % fizzstep = 0 > LEFT OUTER JOIN > (SELECT 5 AS buzzstep, CAST('Buzz' AS CHAR(4)) AS buzz) AS >Buzz >

[GENERAL] Upgrade to 9.3

2014-07-21 Thread Karthik Iyer
Hello, We are planning to upgrade Postgres from 9.0 to 9.3. Was wondering if there are any serious changes that I have to look out for (syntax/datatypes changes) so that my code does not break. Thanks in advance. - Karthik -- Sent via pgsql-general mailing list (pgsql-general@postgresq

Re: [GENERAL] Upgrade to 9.3

2014-07-21 Thread Alan Hodgson
On Monday, July 21, 2014 09:05:18 PM Karthik Iyer wrote: > Hello, > > We are planning to upgrade Postgres from 9.0 to 9.3. Was wondering > if there are any serious changes that I have to look out for > (syntax/datatypes changes) so that my code does not break. > http://www.postgresql.org/do

Re: [GENERAL] Upgrade to 9.3

2014-07-21 Thread Christian Jensen
unsubscribe On Mon, Jul 21, 2014 at 1:22 PM, Alan Hodgson wrote: > On Monday, July 21, 2014 09:05:18 PM Karthik Iyer wrote: > > Hello, > > > > We are planning to upgrade Postgres from 9.0 to 9.3. Was wondering > > if there are any serious changes that I have to look out for > > (syntax/dat

Re: [GENERAL] Checkpoint_segments optimal value

2014-07-21 Thread Kevin Grittner
Prabhjot Sheena wrote: > I m running postgresql 8.3 That is out of support.  If you are at all concerned about performance, you would do well to upgrade to a recent and supported major release. http://www.postgresql.org/support/versioning/ Anyway, it is always a good idea to show the output of

Re: [GENERAL] Checkpoint_segments optimal value

2014-07-21 Thread John R Pierce
On 7/21/2014 1:51 PM, Kevin Grittner wrote: The above might help, but I think the biggest problem may be your VM. You show very low disk I/O numbers, but a pretty significant fraction of the time waiting for I/O. The previously-suggested iostat output may help nail it down more specifically, bu

[GENERAL] Question regarding log files in postgresql

2014-07-21 Thread lucas.g...@gmail.com
I've rolled postgres to 'production', so box is in prod, but the applications aren't active yet. When I rolled the new box I'm seeing 2 log files: postgresql--MM-dd_hhmmss.log AND postgresql-9.3-main.log The 'main' log doesn't appear to be used, however the time stamped file is. Does this m

Re: [GENERAL] Question regarding log files in postgresql

2014-07-21 Thread David G Johnston
lucas.g...@gmail.com wrote > I've rolled postgres to 'production', so box is in prod, but the > applications aren't active yet. > > When I rolled the new box I'm seeing 2 log files: > > postgresql--MM-dd_hhmmss.log > AND > postgresql-9.3-main.log > > The 'main' log doesn't appear to be used,

Re: [GENERAL] Question regarding log files in postgresql

2014-07-21 Thread Adrian Klaver
On 07/21/2014 02:21 PM, lucas.g...@gmail.com wrote: I've rolled postgres to 'production', so box is in prod, but the applications aren't active yet. When I rolled the new box I'm seeing 2 log files: postgresql--MM-dd_hhmmss.log AND postgresql-9.3-main.log Are they both in the same locat

[GENERAL] inequality testing in jsonb query

2014-07-21 Thread Larry White
Hi, Is it possible to query a table with a jsob column to find values that were in some range? For example, If I have a document like this (from the PG documentation: { "guid": "9c36adc1-7fb5-4d5b-83b4-90356a46061a", "name": "Angela Barton", "is_active": true, "company": "Magnafon

Re: [GENERAL] Need r_constraint_name

2014-07-21 Thread Adrian Klaver
On 07/19/2014 12:26 PM, Ramesh T wrote: Hi, In oracle got constraint details using user_constraint, But in postgres how to get the r_constraint_name,constraint_name of the particular table...? mainly i need r_constraint_name on table.. how to get it?please let me know From psql

Re: [GENERAL] inequality testing in jsonb query

2014-07-21 Thread vibhor.ku...@enterprisedb.com
On Jul 21, 2014, at 9:06 PM, Larry White wrote: > Is it possible to query a table with a jsob column to find values that were > in some range? For example, If I have a document like this (from the PG > documentation: > > { > "guid": "9c36adc1-7fb5-4d5b-83b4-90356a46061a", > "name": "A