[GENERAL] Problem with WITH RECURSIVE

2011-05-22 Thread Frank Millman
Hi all I am running PostgreSQL 9.0.3 on Fedora 14. I am trying to use WITH RECURSIVE on an adjacency list. It is mostly working, but I have hit a snag. CREATE TABLE departments ( row_id SERIAL PRIMARY KEY, code VARCHAR NOT NULL parent_id INT REFERENCES departments, description VARCHAR NO

Re: [GENERAL] Problem with WITH RECURSIVE

2011-05-22 Thread Frank Millman
> -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Frank Millman > Sent: 22 May 2011 11:22 > To: pgsql-general@postgresql.org > Subject: [GENERAL] Problem with WITH RECURSIVE > > Hi all > > I am running PostgreSQL

Re: [GENERAL] Syntax Error for "boolean('value')" Type Casting

2011-05-22 Thread Alban Hertroys
On 21 May 2011, at 21:17, David Johnston wrote: > SELECT boolean('true') > >>> SQL Error: ERROR: syntax error at or near "(" >>> LINE 1: SELECT boolean('true') >>> ^ > > The following work as expected: > > SELECT bool('true') (...) > While I'm here.is there any downside t

Re: Fwd: [GENERAL] Unable to Install - "unable to write inside TEMP environment variable path"

2011-05-22 Thread Wei
Can anyone help?  On May 20, 2011, Wei wrote: Forwarded message From: Wei Date: May 20, 2011Subject: [GENERAL] Unable to Install - "unable to write inside TEMP environment variable path"To: pgsql-general@postgresql.orgWhen I install the 9.0.x version on

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-22 Thread jun yang
we don't need se-linux function now ,so it is not the good idea, and se-linux don't available on windows. 2011/5/22 Pavel Stehule : > Hello > > 2011/5/22 jun yang : >> now all the question: >> 1.how start a procedure or a script after postgresql start. >> 2.how to get notify when a table created.

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-22 Thread jun yang
2011/5/22 Scott Marlowe : > On Sat, May 21, 2011 at 10:57 PM, jun yang wrote: >> now all the question: >> 1.how start a procedure or a script after postgresql start. > > Do you need this stored procedure or script to always run at pg > database start?  Or every time a client connects to the databa

Re: [GENERAL] Values larger than 1/3 of a buffer page cannot be indexed (hstore)

2011-05-22 Thread Stefan Keller
Hi Tom, hi all Thanks, Tom, for your tipps. You answered 2011/5/1: > (...), and there's no point in having the > index column contents be the entire tags value (which is what's leading > to the failure). Consider > > create index planet_osm_point_amenity on planet_osm_point ((tags->amenity)); To

Re: [GENERAL] Syntax Error for "boolean('value')" Type Casting

2011-05-22 Thread David Johnston
On May 22, 2011, at 6:22, Alban Hertroys wrote: > On 21 May 2011, at 21:17, David Johnston wrote: > >> SELECT boolean('true') >> SQL Error: ERROR: syntax error at or near "(" LINE 1: SELECT boolean('true') ^ >> >> The following work as expected: >> >> SEL

[GENERAL] repost: unable to install PG

2011-05-22 Thread Wei
When I install the 9.0.x version on my Window Visita Laptop, I get the error. The "Windows Scripting Host" is up. So it is not the topic of this article: http://1stopit.blogspot.com/2011/01/postgresql-83-and-84-fails-to-install.html How to resolve this problem? -- Sent via pgsql-general mail

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-22 Thread Scott Marlowe
On Sun, May 22, 2011 at 6:49 AM, jun yang wrote: > 2011/5/22 Scott Marlowe : >> On Sat, May 21, 2011 at 10:57 PM, jun yang wrote: >>> now all the question: >>> 1.how start a procedure or a script after postgresql start. >> >> Do you need this stored procedure or script to always run at pg >> data

[GENERAL] trigger - dynamic WHERE clause

2011-05-22 Thread Tarlika Elisabeth Schmitz
EXECUTE 'SELECT 1 FROM ' || TG_TABLE_NAME || ' WHERE ' || whereclause || ' FOR UPDATE;'; I am generating the whereclause dynamically as the number of columns queried varies. Am I right in assuming that I cannot use EXECUTE ... USING in this scenario? -- Best Regards, Tarlika Elisabeth Schmitz

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-22 Thread Darren Duncan
John R Pierce wrote: On 05/21/11 10:41 PM, Darren Duncan wrote: Well, if you can run a stored procedure automatically when Postgres starts, that looks like a necessary step to being able to implement an entire application inside Postgres. Starting Postgres is running the application. The ana

Re: [GENERAL] Unable to Install - "unable to write inside TEMP environment variable path"

2011-05-22 Thread Alban Hertroys
On 22 May 2011, at 24:08, Wei wrote: > Can anyone help? According to the error message there's a problem with your TEMP directory, as specified in the %TEMP% environment variable. Perhaps the postgres user isn't allowed to write there or the disk is full. Something like that. Alban Hertroys

Re: [GENERAL] Unable to Install - "unable to write inside TEMP environment variable path"

2011-05-22 Thread John R Pierce
On 05/22/11 10:52 AM, Alban Hertroys wrote: Can anyone help? According to the error message there's a problem with your TEMP directory, as specified in the %TEMP% environment variable. Perhaps the postgres user isn't allowed to write there or the disk is full. Something like that. note too,

Re: [GENERAL] trigger - dynamic WHERE clause

2011-05-22 Thread Pavel Stehule
Hello 2011/5/22 Tarlika Elisabeth Schmitz : > EXECUTE 'SELECT 1 FROM ' || TG_TABLE_NAME || ' WHERE ' || whereclause > || ' FOR UPDATE;'; > > I am generating the whereclause dynamically as the number of columns > queried varies. > > Am I right in assuming that I cannot use EXECUTE ... USING in this

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-22 Thread jun yang
2011/5/23 Darren Duncan : > John R Pierce wrote: >> >> On 05/21/11 10:41 PM, Darren Duncan wrote: >>> >>> Well, if you can run a stored procedure automatically when Postgres >>> starts, that looks like a necessary step to being able to implement an >>> entire application inside Postgres. >>> >>> St

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-22 Thread John R Pierce
On 05/22/11 10:45 AM, Darren Duncan wrote: ...but your entire application would be running in a single transaction. I don't think thats a good thing. Absolutely. But if the kind of stored procedures were supported that can do anything a database client can do, including transaction control

Re: Fwd: [GENERAL] Unable to Install - "unable to write inside TEMP environment variable path"

2011-05-22 Thread Craig Ringer
On 22/05/2011 6:08 AM, Wei wrote: Can anyone help? Please don't just forward a message you already sent to re-post it. Most people will ignore it, as you discovered. Make the minimal effort required to say "I asked this earlier and didn't hear back. I've done a bunch of Google searching, ha

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-22 Thread jun yang
2011/5/22 Scott Marlowe : > On Sun, May 22, 2011 at 6:49 AM, jun yang wrote: >> 2011/5/22 Scott Marlowe : >>> On Sat, May 21, 2011 at 10:57 PM, jun yang wrote: now all the question: 1.how start a procedure or a script after postgresql start. >>> >>> Do you need this stored procedure or

Re: [GENERAL] repost: unable to install PG

2011-05-22 Thread Craig Ringer
On 22/05/2011 10:28 PM, Wei wrote: When I install the 9.0.x version on my Window Visita Laptop, I get the error. The "Windows Scripting Host" is up. So it is not the topic of this article: http://1stopit.blogspot.com/2011/01/postgresql-83-and-84-fails-to-install.html Tip for mailing list comm

Fwd: [GENERAL] how to start a procedure after postgresql started.

2011-05-22 Thread jun yang
-- Forwarded message -- From: jun yang Date: 2011/5/23 Subject: Re: [GENERAL] how to start a procedure after postgresql started. To: Craig Ringer 2011/5/23 Craig Ringer : > On 23/05/2011 9:37 AM, jun yang wrote: > >> what we want to do is explore the ability to move the system t

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-22 Thread Darren Duncan
John R Pierce wrote: On 05/22/11 10:45 AM, Darren Duncan wrote: Absolutely. But if the kind of stored procedures were supported that can do anything a database client can do, including transaction control statements, then the main program routine would typically be one of those. yes, but p

Re: [GENERAL] how to start a procedure after postgresql started.

2011-05-22 Thread Craig Ringer
On 23/05/2011 9:37 AM, jun yang wrote: what we want to do is explore the ability to move the system to the architecture like below: some pg---message broker(qpid)---(web front and some collect data terminal,some business logic server,some system status monitor) when pg start it subscribe to qpid

Re: Fwd: [GENERAL] how to start a procedure after postgresql started.

2011-05-22 Thread John R Pierce
On 05/22/11 7:14 PM, jun yang wrote: actually, we will write the procedure in pl/python,then fork a new thread or a new process which is easy it would have to be a top level process, as you can't have multiple threads within a single postgres service connection interacting with postgres unles

[GENERAL] Where are plpy.execute python commands issued?

2011-05-22 Thread Michael McInnis
I've seen numerous references to this syntax but haven't found where you issue the command. Tried it in a testpython.py file, no luck. Can't find a plpy file anywhere. I know it's going to be simple but need help. rv = plpy.execute("SELECT * FROM my_table

Re: [GENERAL] Memcached for Database server

2011-05-22 Thread Craig Ringer
On 20/05/11 17:33, Adarsh Sharma wrote: > Craig Ringer wrote: >> >> category_id Record_id fields >> 7821 {Village:adasrpur, SOI:media, Heading:CM dies >> > > Yes , but slight modification , I want Village, SOI Heading as column > names and adasrpur,media and CM dies their