Return Multiple Rows from Store Function

2018-07-27 Thread Brahmam Eswar
Hi , Returning multiple rows from store functions using "RETURNS TABLE" and RETURN QUERY. The results set may have more than 50k records. Does it give any performance issues related to memory? if yes how to avoid it CREATE OR REPLACE FUNCTION funcq(COL1 character varying) ) RETURNS TABLE ( a V

How to set array element to null value

2018-07-09 Thread Brahmam Eswar
I'm trying to reset array element to null. but 3rd line of below snippet is giving the compilation error. FOR indx_1 IN array_lower(X, 1)..array_upper(X, 1) LOOP IF X[indx_1].REFERENCE_VALUE = 'ABC' THEN X[indx_1].REFERENCE_VALUE:=''; END IF; END LOOP; -- Thanks & Regards, Brahmeswara Rao J.

Re: How to remove elements from array .

2018-07-06 Thread Brahmam Eswar
e wrote: > Hi > > 2018-07-06 10:19 GMT+02:00 Charles Clavadetscher < > clavadetsc...@swisspug.org>: > >> Hi >> >> >> >> *From:* Brahmam Eswar [mailto:brahmam1...@gmail.com] >> *Sent:* Freitag, 6. Juli 2018 09:50 >> *To:* pgsql-gen

How to remove elements from array .

2018-07-06 Thread Brahmam Eswar
Hi , I tried to use array_remove to remove elements from an array but it's saying function doesn't exist . I'm able to use other array functions. 1) Capture the results with multiple columns into array . 2) if ay results exist then loop through an array to find out the record with col1='Y' 3) I

Re: [GENERAL] Schema Information .

2017-12-05 Thread Brahmam Eswar
M, Melvin Davidson wrote: > > > On Mon, Dec 4, 2017 at 9:17 AM, Brahmam Eswar > wrote: > >> Hi , >> >> Is there anyway to pull the complete information of tables in a >> particular schema . >> >> Table_Name ,Num_Rows,Columns,Indexed_Columns,Trigger

[GENERAL] Schema Information .

2017-12-04 Thread Brahmam Eswar
Hi , Is there anyway to pull the complete information of tables in a particular schema . Table_Name ,Num_Rows,Columns,Indexed_Columns,Triggers. The context of this request is ,we are migrating the database from Oracle to PostgreSQl,,so we need to verify the data after perform data migration fr

[GENERAL] Multiple key error .

2017-11-23 Thread Brahmam Eswar
Unable to add multiple keys to the table. ALTER TABLE table1 ADD CONSTRAINT Table1_PK PRIMARY KEY (Col1,Col2); ERROR: multiple primary keys for table "table1" are not allowed SQL state: 42P16 -- Thanks & Regards, Brahmeswara Rao J.

[GENERAL] Date Time data types

2017-11-23 Thread Brahmam Eswar
What is difference between CLOCK_TIMESTAMP() and CURRENT_TIMESTAMP? Is there any specific use case to differentiate them . -- Thanks & Regards, Brahmeswara Rao J.

[GENERAL] Reset Sequence number

2017-11-22 Thread Brahmam Eswar
we are in process of migrating to postgres and need to reset the sequence number with highest value of table key . I want to make it procedural to do that as mentioned below,But it's throwing an error . DO $$ DECLARE SEQ BIGINT; BEGIN SEQ:=(SELECT MAX(ID) FROM TABLE_1); ALTER SEQUENCE TA