Re: [GENERAL] Extension table data

2012-06-09 Thread Keith Fiske
With the current design, I understand what you're saying now. Just doing some more testing, I was able to do a pg_dump -Fc -s for the entire database and looking through the resulting object list with pg_restore -l I'm actually seeing the extension table data included in the dump file. Doing a

Re: [GENERAL] Extension table data

2012-06-09 Thread Keith Fiske
Just found something else rather disturbing. If you try to exclude the schema that the extension tables are in, their data is still output. Explicitly naming other schemas doesn't seem to dump the extension data. So the only way to avoid getting the extension data in a schema-only dump is to

Re: [GENERAL] Postgres 9.2 beta2 one-click installer on windows

2012-06-09 Thread Craig Ringer
(CCing Dave Page Sachin Srivastava who work on the installer): Short version is that the Pg installer appears to need to: - Include the latest release of the redist because there's a security fix in it - use /passive not /q when invoking it - treat return 5100 as success - swear at Microsoft

Re: [GENERAL] Extension table data

2012-06-09 Thread Yeb Havinga
On 2012-06-09 08:56, Keith Fiske wrote: Looking at the docs, I think the extension authors may have only had configuration data in mind for extension tables. I don't see any reason why we shouldn't be able to put any sort of table in our extensions, some having actual data, not just config.

Re: [GENERAL] Extension table data

2012-06-09 Thread Tom Lane
Keith Fiske ke...@omniti.com writes: Just found something else rather disturbing. If you try to exclude the schema that the extension tables are in, their data is still output. This is a common misconception: extensions do not live within schemas. (An extension might own a schema, not the other

[GENERAL] pass NEW / OLD variable in trigger to table

2012-06-09 Thread Philipp Kraus
Hello, I'm using some trigger functions on a view. Can I pass the NEW / OLD variable to the table of the view? An excerpt of my view shows: IF TG_OP = 'INSERT' then insert into mytable (name, data, commentdata, history) values (NEW.name, NEW.data, NEW.commentdata, NEW.history); ernd

Re: [GENERAL] Extension table data

2012-06-09 Thread Chris Travers
On Sat, Jun 9, 2012 at 5:33 AM, Tom Lane t...@sss.pgh.pa.us wrote: Keith Fiske ke...@omniti.com writes: Just found something else rather disturbing. If you try to exclude the schema that the extension tables are in, their data is still output. This is a common misconception: extensions do not

Re: [GENERAL] pass NEW / OLD variable in trigger to table

2012-06-09 Thread Adrian Klaver
On 06/09/2012 05:49 AM, Philipp Kraus wrote: Hello, I'm using some trigger functions on a view. Can I pass the NEW / OLD variable to the table of the view? An excerpt of my view shows: IF TG_OP = 'INSERT' then insert into mytable (name, data, commentdata, history) values

[GENERAL] Need help to debug a code

2012-06-09 Thread gautam kumar
hi, While using postgis with mapserver ... i am getting black image in place of raster image... please help ... LAYER NAME coolwktraster TYPE raster STATUS DEFAULT #CONNECTIONTYPE ogr DATA PG:host=localhost port=5432 dbname='postgis' user='postgres' password='***' schema='public'

[GENERAL] Extending SQL C-language multidimension arrays

2012-06-09 Thread Chris Schnaufer
I am using Postgrsql 9.0 and writing a C-language extension. The extension takes an n-dimension array and performs a lookup on that array. Right now I'm stuck on determining the dimensions of the array data passed in. No matter what I pass in as the array parameter (the first parameter) I'm

Re: [GENERAL] Extending SQL C-language multidimension arrays

2012-06-09 Thread Tom Lane
Chris Schnaufer chris.schnau...@pictometry.com writes: SELECT getone(ARRAY[[10.1,11.2,12.3],[20.1,21.2,22.3]], POINT(1.0,1.0), 1.5, 1.0, 1.0); SELECT getone(ARRAY[[10.1,11.2,12.3],[20.1,21.2,22.3],[31.1,33.2,35.3],[44.1,45.2,46.3]], POINT(1.0,1.0), 1.5, 1.0, 1.0); To my way of thinking

[GENERAL] is there a select for update insert if not exist type command?

2012-06-09 Thread Evan Rempel
I have a project where I will have two clients essentially doing the same things at the same time. The idea is that if one has already done the work, then the second one does not need to do it. I was hoping that adding a task related unique identifier to a table could be used to coordinate these

Re: [GENERAL] is there a select for update insert if not exist type command?

2012-06-09 Thread Bill Moran
On Sat, 9 Jun 2012 15:41:34 -0700 Evan Rempel erem...@uvic.ca wrote: I have a project where I will have two clients essentially doing the same things at the same time. The idea is that if one has already done the work, then the second one does not need to do it. I was hoping that adding a

Re: [GENERAL] is there a select for update insert if not exist type command?

2012-06-09 Thread Edson Richter
You will find this reading a good start point: http://www.cs.uiuc.edu/class/fa07/cs411/lectures/cs411-f07-tranmgr-3.pdf There are no fit all needs cookbook about this, you will have to learn the theory about transactional database transaction management and locking mechanism and work on your

Re: [GENERAL] is there a select for update insert if not exist type command?

2012-06-09 Thread David Johnston
-Original Message- Both clients A and B becomes aware to do a task Ideally you would have this aware-ness manifested as an INSERT into some kind of job table. The clients can issue the SELECT FOR UPDATE + UPDATE commands to indicate that they are going to be responsible for said

Re: [GENERAL] is there a select for update insert if not exist type command?

2012-06-09 Thread Evan Rempel
Thanks for the input. Dave also replied indicating that without more details it is difficult the really help. I was intentionally vague to see if there was some SQL standard way like to mysql insert ... on duplicate update ... syntax, or the proposed MSSQL merge command. Since not, I'll give a

Re: [GENERAL] is there a select for update insert if not exist type command?

2012-06-09 Thread Chris Travers
Depending on the version of Pg there are two possible solutions to this problem. The first (old solution) that really only works well one row at a time is to do a stored procedure that does something like: update foo set bar = baz where id = in_id if not found insert into foo (bar) values

Re: [GENERAL] is there a select for update insert if not exist type command?

2012-06-09 Thread Edson Richter
One of the possible strategies that comes to my mind is: 1) Log your syslog stream into PostgreSQL database (no need to record all message, just a simple table the the event key and a flag processed field) 2) When problem event arrives, the first server should select for update on the event