Re: [SQL] trigger failed to identify the partions

2009-09-09 Thread Richard Huxton
Sridhar Reddy Ratna wrote: > > cmd := 'INSERT INTO ' || dateTable || > EXECUTE cmd; > RETURN NEW; > If I changed the RETURN NEW to RETURN NULL its inserting only one row. Yes. RETURN NEW allows the insert to procede normally so you end up with the two rows. > But to work wi

Re: [SQL] trigger failed to identify the partions

2009-09-09 Thread Sridhar Reddy Ratna
Sridhar ratna -Original Message- From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of Richard Huxton Sent: Wednesday, September 09, 2009 3:35 PM To: Sridhar Reddy Ratna Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] trigger failed to

Re: [SQL] trigger failed to identify the partions

2009-09-09 Thread Richard Huxton
Sridhar Reddy Ratna wrote: > > dateTable := coll_fp_subdtls_01; > > ELSE > > dateTable := coll_fp_subdtls_02; > ERROR: column "coll_fp_subdtls_01" does not exist > > ERROR: column "coll_fp_subdtls_01" does not exist I think you mi

[SQL] trigger failed to identify the partions

2009-09-09 Thread Sridhar Reddy Ratna
Hi all, I have created a table and partitions as below. CREATE TABLE coll_fp_submission_details ( rrid numeric NOT NULL, sid numeric NOT NULL, pfid numeric NOT NULL, "timestamp" date NOT NULL, schema_version numeric NOT NULL, details character varying NOT NULL, app_