Re: [SQL] Order of evaluation in triggers for checks on inherited table partitions

2011-05-27 Thread Tarlika Elisabeth Schmitz
On Fri, 27 May 2011 12:28:51 -0700 Kevin Crain wrote: >Is the order of evaluation for the trigger causing this error? Are you aware that triggers are executed in alphabetical order? I simply used RAISE to check the order of execution of my triggers: RAISE NOTICE '% % % %: received %', TG_TABLE

[SQL] Order of evaluation in triggers for checks on inherited table partitions

2011-05-27 Thread Kevin Crain
I am trying to create a trigger on updates to a table that is partitioned. The child tables are partitioned by month and include checks on a timestamp field. I want the trigger on the updates to call a function that replaces the update entirely. In order to do this my trigger deletes the record

Re: [SQL] Re: 500KB PDF files for postgresql8.3, which is the most efficient way?

2011-05-27 Thread Samuel Gendler
On Fri, May 27, 2011 at 9:15 AM, Emi Lu wrote: > > Solution: > > (1) Save pdfs to file system, only point file name in psql8.3 > > (2) Save oids of pdfs into table > > (3) Save pdf files as bytea column in psql8.3 > > > Pros and cons for (1), (2), (3), which is the most

[SQL] 500KB PDF files for postgresql8.3, which is the most efficient way?

2011-05-27 Thread Emi Lu
Hello, I'd like to have more comments about the following case: . 500KB per PDF file; 30 files per year . PSQL8.3 Solution: (1) Save pdfs to file system, only point file name in psql8.3 (2) Save oids of pdfs into table (3) Save pdf files as bytea column in psql8.3 Pros a

[SQL] Re: 500KB PDF files for postgresql8.3, which is the most efficient way?

2011-05-27 Thread Emi Lu
Hello, I'd like to have more comments about the following case: . 500KB per PDF file; 30 files per year . PSQL8.3 . struts2.2.3 + mybatis for sql operation . tomcat6 Added more info Solution: (1) Save pdfs to file system, only point file name in psql8.3 (2) Save

Re: [SQL] Performance of NOT IN and <> with PG 9.0.4

2011-05-27 Thread Robert Haas
On Tue, May 24, 2011 at 5:10 PM, Jasmin Dizdarevic wrote: > That's strange... > If I comment out these rows > --sum(coalesce(e.num_wert,0)), > --sum(coalesce(d.num_wert,0)) > in the given statement, it works fine with enable_material = 'on'. > I didn't change any join. That's not that strange. T