[GENERAL] Change in order of criteria - reg

2016-05-31 Thread sri harsha
Hi, In PostgreSQL , does the order in which the criteria is given matter ?? For example Query 1 : Select * from TABLE where a > 5 and b < 10; Query 2 : Select * from TABLE where b <10 and a > 5; Are query 1 and query 2 the same in PostgreSQL or different ?? If its different , WHY ?? Than

[GENERAL] Threads in PostgreSQL

2015-12-20 Thread sri harsha
Hi, Is it possible to use threads in Postgresql ?? I am using threads in my foreign data wrapper and i get the following error when i use the threads . *ERROR: stack depth limit exceeded* *HINT: Increase the configuration parameter "max_stack_depth" (currently 2048kB), after ensuring the pla

[GENERAL] Multiple Update queries

2015-09-15 Thread sri harsha
Hello, I am using a foreign data wrapper where i get a portion of my data pre-loaded , i.e I get a set of rows before hand . So now i want to run multiple update queries on this loaded data , write the changes to file , load the next set and continue with updates again. How should i try

[GENERAL] How does Delete Query work ??

2015-01-28 Thread sri harsha
Hi, I want to know about the flow in which delete query is executed in postgres . Assume i have a following query. *Delete from table_a * where column_a = 'something'* How is this query executed ? Are the rows first filtered out and then deleted one by one ?? Or is the row deleted as and whe

Re: [GENERAL] Concurrent Inserts

2015-01-21 Thread sri harsha
, Albe Laurenz wrote: > sri harsha wrote: > >Is there any way to stop concurrent inserts to happen on a single > table ?? > > > > Query 1 : INSERT INTO TABLE_A SELECT * FROM TABLE1; > > Query 2 : INSERT INTO TABLE_A SELECT * FROM TABLE2; > > Query 3 : SELECT *

[GENERAL] Concurrent Inserts

2015-01-21 Thread sri harsha
Hi, Is there any way to stop concurrent inserts to happen on a single table ?? Query 1 : INSERT INTO TABLE_A SELECT * FROM TABLE1; Query 2 : INSERT INTO TABLE_A SELECT * FROM TABLE2; Query 3 : SELECT * FROM TABLE_A; Assume i have the above queries. Query 1 and Query 3 can occur concurrently .

Re: [GENERAL] Information regarding Table-Locks

2015-01-15 Thread sri harsha
Hi John. What if my query was INSERT INTO Postgres_Table_A SELECT * FROM Postgres_Table_B ?? What are the locks given for the two tables ?? --Harsha On Fri, Jan 16, 2015 at 10:50 AM, John R Pierce wrote: > On 1/15/2015 9:14 PM, sri harsha wrote: > >> What kind of lock wil

[GENERAL] Information regarding Table-Locks

2015-01-15 Thread sri harsha
Hi, I have a few doubts regarding table locks. Assume I am executing the following query Query 1 -- INSERT INTO FOREIGN_TABLE SELECT * FROM POSTGRES_TABLE Query 2 -- INSERT INTO FOREIGN_TABLE SELECT * FROM FOREIGN_TABLE If i get a table lock for the foreign table , will the second table from

[GENERAL] TRUNCATE and CREATE TABLE LIKE for foreign tables

2014-12-03 Thread sri harsha
Hi, Is it possible to implement TRUNCATE and CREATE TABLE LIKE for a foreign table. Is there anyway i can write a function to implement those queries in my FDW ?? Thanks, Harsha

[GENERAL] Convert raw fields into Datum

2014-10-08 Thread sri harsha
Hi, I have the raw fields of a particular row in char * . Now my requirement is to convert these value into datum * . How should i go about this ? Does converting into datum depends on the type of the field too ? -- Harsha