Re: [GENERAL] Trouble with NEW

2012-07-18 Thread Alban Hertroys
On 19 Jul 2012, at 24:20, Bob Pawley wrote: > When I substitute new.fluid_id for the actual fluid)id the expression returns > the right value. > > Following is the table - > > CREATE TABLE p_id.fluids > ( > p_id_id integer, > fluid_id serial, I think people meant the one on which the trigger f

Re: [GENERAL] [BUGS] main log encoding problem

2012-07-18 Thread Alexander Law
Hello, C. We have one logfile with UTF-8. Pros: Log messages of all our clients can fit in it. We can use any generic editor/viewer to open it. Nothing changes for Linux (and other OSes with UTF-8 encoding). Cons: All the strings written to log file should go through some conversation function.

Re: [GENERAL] Segmentation fault

2012-07-18 Thread Craig Ringer
On 07/19/2012 01:52 PM, Amod Pandey wrote: Thank you Craig for explaining in such a detail. I am adding more information and would see what more I can add, $ulimit -a core file size (blocks, -c) 0 So I assume there to be no core dump file. Quite likely. Limits are inherited down proce

Re: [GENERAL] Problem running "ALTER TABLE...", ALTER TABLE waiting

2012-07-18 Thread Sergey Konoplev
On Wed, Jul 18, 2012 at 9:42 PM, Brian McNally wrote: > I don't get any rows returned back from that query. I'm running it while > connected to the DB in question. Am I supposed to substitute values for any Try this one. Are there any COPY queries (current_query) or long lasting transactions (age

Re: [GENERAL] main log encoding problem

2012-07-18 Thread Craig Ringer
On 07/18/2012 11:16 PM, Alexander Law wrote: Hello! May I to propose a solution and to step up? I've read a discussion of the bug #5800 and here is my 2 cents. To make things clear let me give an example. I am a PostgreSQL hosting provider and I let my customers to create any databases they wi

Re: [GENERAL] data from the table is getting dropped when I am restarting my application after making changes in the objects created in my application in play

2012-07-18 Thread Craig Ringer
On 07/19/2012 03:19 AM, rajonr...@gmail.com wrote: I am creating one application using play in the models I had created a table and everything is working fine except when i make changes in any of the object(fields) all the previous data in the database is getting dropped how to recover that

Re: [GENERAL] Segmentation fault

2012-07-18 Thread Craig Ringer
On 07/19/2012 12:37 AM, Amod Pandey wrote: Server stopped due to Segmentation Fault. Server was running successfully for an year. PostgreSQL: 9.0.3 from /var/log/messages Jul 18 19:00:03 ip-10-136-22-193 kernel: [18643442.660032] postgres[6818]: segfault at 170a8c6f ip 0044c94d sp 0

[GENERAL] Odd corruption issue reported on dba.stackexchange.com, need advice

2012-07-18 Thread Craig Ringer
Hi all I've been following a strange issue on dba.stackexchange.com and I could use opinions from those more clueful than I on the log files posted there. http://dba.stackexchange.com/questions/20959/recover-postgresql-database-from-wal-errors-on-startup/20961#comment34356_20961 The short ver

Re: [GENERAL] problem with dblink and "drop owned by"

2012-07-18 Thread Tom Lane
"James W. Wilson" writes: > I'm confused. I thought foreign data wrappers were required to create > database links from one Postgresql server to another. contrib/dblink doesn't require them. It does have an option to use an FDW instead of a libpq connection string to specify the connection targe

Re: [GENERAL] [BUGS] main log encoding problem

2012-07-18 Thread Tatsuo Ishii
> Tatsuo Ishii writes: >> My idea is using mule-internal encoding for the log file instead of >> UTF-8. There are several advantages: > >> 1) Converion to mule-internal encoding is cheap because no conversion >>table is required. Also no information loss happens in this >>conversion. > >

Re: [GENERAL] [BUGS] main log encoding problem

2012-07-18 Thread Tom Lane
Tatsuo Ishii writes: > My idea is using mule-internal encoding for the log file instead of > UTF-8. There are several advantages: > 1) Converion to mule-internal encoding is cheap because no conversion >table is required. Also no information loss happens in this >conversion. > 2) Mule-in

Re: [GENERAL] data from the table is getting dropped when I am restarting my application after making changes in the objects created in my application in play

2012-07-18 Thread Adrian Klaver
On 07/18/2012 12:19 PM, rajonr...@gmail.com wrote: I am creating one application using play in the models I had created a table and everything is working fine except when i make changes in any of the object(fields) all the previous data in the database is getting dropped how to recover that T

Re: [GENERAL] installation problem with postgres password

2012-07-18 Thread KOTa
thanks! that solved a problem. i used my own account. but it does not seem to be a limitation in number of accounts. because i can create new account, but without password. the problem comes out when i try to add password to it. On Wed, Jul 18, 2012 at 5:13 PM, Alban Hertroys wrote: > On 18 Jul

[GENERAL] Segmentation fault

2012-07-18 Thread Amod Pandey
Server stopped due to Segmentation Fault. Server was running successfully for an year. PostgreSQL: 9.0.3 from /var/log/messages Jul 18 19:00:03 ip-10-136-22-193 kernel: [18643442.660032] postgres[6818]: segfault at 170a8c6f ip 0044c94d sp 7fff9fee5b80 error 4 in postgres[40+49500

Re: [GENERAL] Problem running "ALTER TABLE...", ALTER TABLE waiting

2012-07-18 Thread Brian McNally
Hi Raghu, I don't get any rows returned back from that query. I'm running it while connected to the DB in question. Am I supposed to substitute values for any of the variables in the query? -- Brian McNally On 07/17/2012 07:23 PM, raghu ram wrote: On Wed, Jul 18, 2012 at 1:24 AM, Brian M

[GENERAL] data from the table is getting dropped when I am restarting my application after making changes in the objects created in my application in play

2012-07-18 Thread rajonrole
I am creating one application using play in the models I had created a table and everything is working fine except when i make changes in any of the object(fields) all the previous data in the database is getting dropped how to recover that -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] problem with dblink and "drop owned by"

2012-07-18 Thread James W. Wilson
I'm confused. I thought foreign data wrappers were required to create database links from one Postgresql server to another. Is there some way to create a database link without using them? I was working off of this example: http://www.postgresql.org/docs/8.4/static/contrib-dblink-connect.html I'm

Re: [GENERAL] [BUGS] main log encoding problem

2012-07-18 Thread Tatsuo Ishii
> C. We have one logfile with UTF-8. > Pros: Log messages of all our clients can fit in it. We can use any > generic editor/viewer to open it. > Nothing changes for Linux (and other OSes with UTF-8 encoding). > Cons: All the strings written to log file should go through some > conversation function

Re: [GENERAL] Trouble with NEW

2012-07-18 Thread Bob Pawley
When I substitute new.fluid_id for the actual fluid)id the expression returns the right value. Following is the table - CREATE TABLE p_id.fluids ( p_id_id integer, fluid_id serial, text_arrow geometry, line geometry, ip_op_equipment character varying(3), pipe_number character varying(100)

Re: [GENERAL] problem with dblink and "drop owned by"

2012-07-18 Thread Tom Lane
"James W. Wilson" writes: > Hi, I'm using Postgresql 8.4.12-1 on Debian. I've installed 'dblink' > from the contrib package (also 8.4.12-1) and am now running into a > strange problem when I run "drop owned by". You're running into a old bug, which is that DROP OWNED BY doesn't know what to do wi

Re: [GENERAL] Trouble with NEW

2012-07-18 Thread Alan Hodgson
On Wednesday, July 18, 2012 12:28:00 PM Bob Pawley wrote: > It's an insert after trigger function. > > The table has a column named fluid_id. > > Bob Could you post the whole function? And a \d on the table? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make change

[GENERAL] Some feedback on range types

2012-07-18 Thread Scott Bailey
I'm testing range types and I've come up with a couple of curiosities. 1) I'll start off easy. In the wild, discrete ranges tend to be closed-closed [] while continuous ranges tend to be closed-open [). For instance, on Tuesday stock traded at [28.34, 32.18] or Bob was employed [2009-06-01, 20

[GENERAL] problem with dblink and "drop owned by"

2012-07-18 Thread James W. Wilson
Hi, I'm using Postgresql 8.4.12-1 on Debian. I've installed 'dblink' from the contrib package (also 8.4.12-1) and am now running into a strange problem when I run "drop owned by". First, as the superuser I run 'dblink.sql' against the database I'll be using. Then I connect and do the following (th

Re: [GENERAL] Trouble with NEW

2012-07-18 Thread Adrian Klaver
On 07/18/2012 12:28 PM, Bob Pawley wrote: It's an insert after trigger function. The table has a column named fluid_id. Can we see the table schema. What I am looking for is quoted column name that would preserve case. Bob -- Adrian Klaver adrian.kla...@gmail.com -- Sent via pgsql-ge

Re: [GENERAL] Trouble with NEW

2012-07-18 Thread Bob Pawley
It's an insert after trigger function. The table has a column named fluid_id. Bob -Original Message- From: Alan Hodgson Sent: Wednesday, July 18, 2012 11:15 AM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] Trouble with NEW On Wednesday, July 18, 2012 11:07:34 AM Bob Pawley

Re: [GENERAL] Trouble with NEW

2012-07-18 Thread Alan Hodgson
On Wednesday, July 18, 2012 11:07:34 AM Bob Pawley wrote: > Hi > > I would appreciate some fresh eyes on this expression - > > update p_id.fluids > set fluid_short = > (select shape.text > from shape, num_search > where (select st_within(shape.wkb_geometry, > st_geometryn(num_sea

Re: [GENERAL] Trouble with NEW

2012-07-18 Thread Rob Sargent
On 07/18/2012 12:07 PM, Bob Pawley wrote: Hi I would appreciate some fresh eyes on this expression - update p_id.fluids set fluid_short = (select shape.text from shape, num_search where (select st_within(shape.wkb_geometry, st_geometryn(num_search.the_geom4, 1)) = 'true')

[GENERAL] Trouble with NEW

2012-07-18 Thread Bob Pawley
Hi I would appreciate some fresh eyes on this expression - update p_id.fluids set fluid_short = (select shape.text from shape, num_search where (select st_within(shape.wkb_geometry, st_geometryn(num_search.the_geom4, 1)) = 'true') and text !~ '[0-9]') where p_id.flui

Re: [GENERAL] Chicken/egg problem with range types

2012-07-18 Thread Alban Hertroys
On 18 Jul 2012, at 16:15, Tom Lane wrote: > Alban Hertroys writes: >> On 18 Jul 2012, at 5:08, Tom Lane wrote: >>> I wonder whether we could improve this by postponing the no-shell-types >>> check from creation to function runtime. > >> I don't suppose it'd be possible to treat it as a deferred

Re: [GENERAL] Chicken/egg problem with range types

2012-07-18 Thread Scott Bailey
On 07/17/2012 08:08 PM, Tom Lane wrote: I wonder whether we could improve this by postponing the no-shell-types check from creation to function runtime. It would be annoying to have to make an additional catalog lookup at runtime just for typisdefined, but I think that probably we could fold it

Re: [GENERAL] Where is diskchecker.pl ?

2012-07-18 Thread Rene Romero Benavides
On Wednesday 18 July 2012 16:11:21 jg wrote: > Hi, > > The PostgreSQK documentation refers to diskchecker.pl on the page > http://brad.livejournal.com/2116715.html But on this page, the given link > for diskchecker.pl does not exist anymore. After some unsuccessfull queries > on Google to find the

Re: [GENERAL] main log encoding problem

2012-07-18 Thread Alexander Law
Hello! May I to propose a solution and to step up? I've read a discussion of the bug #5800 and here is my 2 cents. To make things clear let me give an example. I am a PostgreSQL hosting provider and I let my customers to create any databases they wish. I have clients all over the world (so they

[GENERAL] Re: BUG #6742: pg_dump doesn't convert encoding of DB object names to OS encoding

2012-07-18 Thread Alexander Law
Hello! May I to propose a solution and to step up? I've read a discussion of the bug #5800 and here is my 2 cents. To make things clear let me give an example. I am a PostgreSQL hosting provider and I let my customers to create any databases they wish. I have clients all over the world (so they

Re: [GENERAL] installation problem with postgres password

2012-07-18 Thread Craig Ringer
On 07/18/2012 10:13 PM, Alban Hertroys wrote: On 18 July 2012 10:33, KOTa wrote: update. managed to run it via command prompt "postgres_install.exe --serviceaccount postgres" it did start. it still asks for a password, but because i could not create any password for this user and installation d

Re: [GENERAL] Chicken/egg problem with range types

2012-07-18 Thread Tom Lane
Alban Hertroys writes: > On 18 Jul 2012, at 5:08, Tom Lane wrote: >> I wonder whether we could improve this by postponing the no-shell-types >> check from creation to function runtime. > I don't suppose it'd be possible to treat it as a deferred constraint? Then > the check would be moved to the

Re: [GENERAL] installation problem with postgres password

2012-07-18 Thread Alban Hertroys
On 18 July 2012 10:33, KOTa wrote: > update. managed to run it via command prompt "postgres_install.exe > --serviceaccount postgres" > it did start. it still asks for a password, but because i could not > create any password for this user and installation does not accept > empty password, i am sti

[GENERAL] Where is diskchecker.pl ?

2012-07-18 Thread jg
Hi, The PostgreSQK documentation refers to diskchecker.pl on the page http://brad.livejournal.com/2116715.html But on this page, the given link for diskchecker.pl does not exist anymore. After some unsuccessfull queries on Google to find the missing file, I wonder if one of you have a lin or a co

Re: [GENERAL] installation problem with postgres password

2012-07-18 Thread KOTa
thank, this is a good idea. 1. i created account "postgres" 2. i tried to create a password for it, but got the same error message 3. i tried to run postgres installation with --serviceaccount option, but can't figure out a way to do it in win 7. (i tried to do it as i did in win XP - from comman

Re: [GENERAL] installation problem with postgres password

2012-07-18 Thread KOTa
update. managed to run it via command prompt "postgres_install.exe --serviceaccount postgres" it did start. it still asks for a password, but because i could not create any password for this user and installation does not accept empty password, i am still stuck On Wed, Jul 18, 2012 at 11:27 AM, KO

Re: [GENERAL] Can I create a trigger to add another record based on the inserted record in the same table?

2012-07-18 Thread David Johnston
On Jul 18, 2012, at 8:37, David Johnston wrote: > On Jul 17, 2012, at 20:59, Mohd Shaiza Ibrahim wrote: > >> Hi, >> >> Can you guys please help me? My question sounds like this. >> >> When I insert a new record in a table, can I create a trigger to add >> another record based on the inserted

Re: [GENERAL] Can I create a trigger to add another record based on the inserted record in the same table?

2012-07-18 Thread David Johnston
On Jul 17, 2012, at 20:59, Mohd Shaiza Ibrahim wrote: > Hi, > > Can you guys please help me? My question sounds like this. > > When I insert a new record in a table, can I create a trigger to add > another record based on the inserted record in the same table? > > For example, > > INSERT INTO

Re: [GENERAL] Can't reset password

2012-07-18 Thread Radosław Smogura
On Tue, 17 Jul 2012 22:42:22 -0400, Keith Chen wrote: Hello, I deleted my Postgresql and try to reinstall it. I try to reset the password by typing in net user postgres *. However, the new password doesn't work when the installer prompt me to input the password. Could you please help me? Than

Re: [GENERAL] index update

2012-07-18 Thread Thomas Munro
Pawel Veselov wrote: >Hi. > >If I have a lot (10k) tables, and each table has a btree index, and all the >tables are being constantly inserted into, would all the indexes have to be >in memory, and would effectively start fighting for space? > >Thank you, > Pawel. -- Sent via pgsql-general m

Re: [GENERAL] Chicken/egg problem with range types

2012-07-18 Thread Alban Hertroys
On 18 Jul 2012, at 5:08, Tom Lane wrote: > Scott Bailey writes: >> I'm trying to create a discrete range type and I'm having trouble with >> the canonical function. > I wonder whether we could improve this by postponing the no-shell-types > check from creation to function runtime. It would be