Re: [GENERAL] WAL Log Size

2008-02-28 Thread Scott Marlowe
On Fri, Feb 29, 2008 at 1:08 AM, Greg Smith <[EMAIL PROTECTED]> wrote: > On Fri, 29 Feb 2008, Sam Mason wrote: > > > Just out of interest, why doesn't it do the following? > > > > BEGIN; > > create table xlog_switch as > >select '0123456789ABCDE' from generate_series(1,100); > > RO

Re: [GENERAL] WAL Log Size

2008-02-28 Thread Greg Smith
On Fri, 29 Feb 2008, Sam Mason wrote: Just out of interest, why doesn't it do the following? BEGIN; create table xlog_switch as select '0123456789ABCDE' from generate_series(1,100); ROLLBACK; I'm not 100% sure here what happens when you do the above, and it depends on version, but

Re: [GENERAL] rule question

2008-02-28 Thread Klint Gore
[see below or the top posting police will arrive on my doorstep :)] Devi wrote: Hi, CREATE RULE dosen't require any lock. It is carried out in the parser level. But there will be ACCESS SHARE lock over the tables which are being queried & are acquired automatically. Thanks DEVI.G - Or

Re: [GENERAL] "Consider compacting this relation..." ???

2008-02-28 Thread Tom Lane
"Scott Marlowe" <[EMAIL PROTECTED]> writes: > On Thu, Feb 28, 2008 at 3:14 PM, Kynn Jones <[EMAIL PROTECTED]> wrote: >> What does the hint mean by "compacting"? What exactly must I do to compact >> this table? > Vacuum full CLUSTER is a good alternative also, though pre-8.3 you need to consider

Re: [GENERAL] rule question

2008-02-28 Thread Devi
Hi, CREATE RULE dosen't require any lock. It is carried out in the parser level. But there will be ACCESS SHARE lock over the tables which are being queried & are acquired automatically. Thanks DEVI.G - Original Message - From: "Tim Rupp" <[EMAIL PROTECTED]> To: Sent: Friday, Feb

Re: [GENERAL] Text Search zero padding

2008-02-28 Thread Tom Lane
"Richard Greenwood" <[EMAIL PROTECTED]> writes: > I am using text search across multiple columns. Two of the columns > have values that have zero padding - sort of. The values look like > R0001234 (1 char followed by 7 digits, zero padded). Users are > accustom to searching with and without the zer

[GENERAL] Text Search zero padding

2008-02-28 Thread Richard Greenwood
I am using text search across multiple columns. Two of the columns have values that have zero padding - sort of. The values look like R0001234 (1 char followed by 7 digits, zero padded). Users are accustom to searching with and without the zero padding (entering R0001234 or R1234 should return iden

[GENERAL] rule question

2008-02-28 Thread Tim Rupp
Hey list, Does CREATE RULE require an exclusive lock on the table it's making a rule for? For instance, if an insert is being done on the table, and you do 'create rule', it will wait for said insert to finish? Thanks, -Tim ---(end of broadcast)---

Re: [GENERAL] WAL Log Size

2008-02-28 Thread Sam Mason
On Thu, Feb 28, 2008 at 04:35:44PM -0500, Greg Smith wrote: > Courtesy of Simon ( > http://archives.postgresql.org/pgsql-general/2007-06/msg00015.php ) you > can force 16MB worth of WAL activity that doesn't leave any changes behind > with: > > create table xlog_switch as > select '0123456789AB

Re: [GENERAL] "Consider compacting this relation..." ???

2008-02-28 Thread Scott Marlowe
On Thu, Feb 28, 2008 at 3:14 PM, Kynn Jones <[EMAIL PROTECTED]> wrote: > I just ran VACUUM ANALYZE and got this warning I've never seen before: > > WARNING: relation "public.some_big_table" contains more than > "max_fsm_pages" pages with useful free space > HINT: Consider compacting this relatio

Re: [GENERAL] LIMIT Question

2008-02-28 Thread Scott Marlowe
On Thu, Feb 28, 2008 at 3:20 PM, Terry Lee Tucker <[EMAIL PROTECTED]> wrote: > When one uses LIMIT, as in LIMIT 1, is the entire query executed on the server > side, but only one record returned? > > > --

Re: [GENERAL] WAL Log Size

2008-02-28 Thread John Evans
On Thu, 28 Feb 2008, Greg Smith wrote: Nope; you'd want to play with XLOG_SEG_SIZE to change this. Have to dump/initdb/reload your database as well to do it. Really just not a good idea. Thanks for the insight there. I figured changing the code would be dangerous. I'm glad I asked, and than

[GENERAL] errors in pg_restore on windows?

2008-02-28 Thread Dan Armbrust
Using PostgreSQL 8.3 on Windows, I make a backup like this: pg_dump -U postgres -C -d -D -Fc -f ispaaa-pg.bak ispaaa Then restore like this: pg_restore -U postgres -C -d template1 -v -Fc ispaaa-pg.bak And I get lots of these errors: pg_restore: creating TABLE voip pg_restore: creating FUNCTION

[GENERAL] LIMIT Question

2008-02-28 Thread Terry Lee Tucker
When one uses LIMIT, as in LIMIT 1, is the entire query executed on the server side, but only one record returned? PostgreSQL 7.4.19 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 3.4.6

Re: [GENERAL] Space wasted by denormalized data

2008-02-28 Thread Colin Wetherbee
Decibel! wrote: I wrote this query to identify how much space is being wasted in a database by denormalized data. For each field in each table, it calculates how much space the field is taking in it's table as well as indexes, then it calculates how much space would be needed if that field was

Re: [GENERAL] syntax errors at "line 1" when executing every command

2008-02-28 Thread Thomas Kellerer
Steven De Vriendt wrote on 28.02.2008 21:42: Hi list, I'm using the latest postgreSQL with the lastest postgis. When executing every command I want to use, I get the following error message: postgis=# createdb; ERROR: syntax error at or near "createdb" LINE 1: createdb; ^ I can us

[GENERAL] Space wasted by denormalized data

2008-02-28 Thread Decibel!
I wrote this query to identify how much space is being wasted in a database by denormalized data. For each field in each table, it calculates how much space the field is taking in it's table as well as indexes, then it calculates how much space would be needed if that field was normalized into a se

Re: [GENERAL] partitioning using dblink

2008-02-28 Thread Scara Maccai
Alvaro Herrera wrote: > I think you can do pretty much the same thing with PL/Proxy; see > https://developer.skype.com/SkypeGarage/DbProjects/PlProxy Mmmh, I actually looked into that but I thought it only worked with user functions... am I wrong? What I'd like to have is an almost-transparent h

Re: [GENERAL] WAL Log Size

2008-02-28 Thread Greg Smith
On Thu, 28 Feb 2008, John Evans wrote: How can I change the WAL log size from 16MB to something smaller? Ideally, I would like to shoot for 8MB or even 4MB. The only thing that I've found is to hack the code to change all instances of YY_READ_BUF_SIZE from 16777216 to 4194304, but I'm not sure

Re: [GENERAL] syntax errors at "line 1" when executing every command

2008-02-28 Thread Michael Glaesemann
On 2008-02-28, at 3:42 PM, Steven De Vriendt wrote: Hi list, I'm using the latest postgreSQL with the lastest postgis. When executing every command I want to use, I get the following error message: postgis=# createdb; ERROR: syntax error at or near "createdb" LINE 1: createdb; createdb

Re: [GENERAL] WAL Log Size

2008-02-28 Thread Erik Jones
On Feb 28, 2008, at 1:58 PM, Alan Hodgson wrote: On Thursday 28 February 2008, Erik Jones <[EMAIL PROTECTED]> wrote: Or, even simpler: SELECT pg_switch_xlog(); The original poster is using 8.1. Ah, I didn't realize that was only available in >= 8.2, thanks for the clarification. Erik J

[GENERAL] "Consider compacting this relation..." ???

2008-02-28 Thread Kynn Jones
I just ran VACUUM ANALYZE and got this warning I've never seen before: WARNING: relation "public.some_big_table" contains more than "max_fsm_pages" pages with useful free space HINT: Consider compacting this relation or increasing the configuration parameter "max_fsm_pages". What does the hint

Re: [GENERAL] partitioning using dblink

2008-02-28 Thread Alvaro Herrera
Scara Maccai wrote: > I started thinking that using dblink I could "easily" get some kind of > read only multi-server partitioning, if only VIEWs could be declared > with "INHERITS"... I think you can do pretty much the same thing with PL/Proxy; see https://developer.skype.com/SkypeGarage/DbProje

Re: [GENERAL] syntax errors at "line 1" when executing every command

2008-02-28 Thread Colin Wetherbee
Steven De Vriendt wrote: I'm using the latest postgreSQL with the lastest postgis. When executing every command I want to use, I get the following error message: postgis=# createdb; ERROR: syntax error at or near "createdb" LINE 1: createdb; What other commands are you trying? "createdb"

[GENERAL] syntax errors at "line 1" when executing every command

2008-02-28 Thread Steven De Vriendt
Hi list, I'm using the latest postgreSQL with the lastest postgis. When executing every command I want to use, I get the following error message: postgis=# createdb; ERROR: syntax error at or near "createdb" LINE 1: createdb; ^ I can use psql to reach my database, but after that I'm

[GENERAL] partitioning using dblink

2008-02-28 Thread Scara Maccai
Hi, I started thinking that using dblink I could "easily" get some kind of read only multi-server partitioning, if only VIEWs could be declared with "INHERITS"... That way I think I could 1) add as many views as the number of DBs as CREATE VIEW mytable_part_n AS INHERITS mytable to every D

Re: [GENERAL] WAL Log Size

2008-02-28 Thread Alan Hodgson
On Thursday 28 February 2008, Erik Jones <[EMAIL PROTECTED]> wrote: > Or, even simpler: > > SELECT pg_switch_xlog(); The original poster is using 8.1. -- Alan ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] "=" or ":=" ?

2008-02-28 Thread Jeff Davis
On Thu, 2008-02-28 at 20:11 +0100, BERTRAND Joël wrote: > Tom Lane wrote: > > =?ISO-8859-1?Q?BERTRAND_Jo=EBl?= <[EMAIL PROTECTED]> writes: > >> What is the difference between "=" and ":=" ? > > > > None; plpgsql accepts either for assignment. > > Thank you for your answer. I suggest to add

Re: [GENERAL] WAL Log Size

2008-02-28 Thread Erik Jones
On Feb 28, 2008, at 12:51 PM, Alan Hodgson wrote: On Thursday 28 February 2008, John Evans <[EMAIL PROTECTED]> wrote: I've heard that upgrading to 8.2 or 8.3 will allow me to setup a timeout value for WAL log creation, but upgrading at this time is not an option for various reasons.

Re: [GENERAL] "=" or ":=" ?

2008-02-28 Thread BERTRAND Joël
Tom Lane wrote: =?ISO-8859-1?Q?BERTRAND_Jo=EBl?= <[EMAIL PROTECTED]> writes: What is the difference between "=" and ":=" ? None; plpgsql accepts either for assignment. Thank you for your answer. I suggest to add a note in documentation ;-) Regards, JKB

Re: [GENERAL] WAL Log Size

2008-02-28 Thread Alan Hodgson
On Thursday 28 February 2008, John Evans <[EMAIL PROTECTED]> wrote: >I've heard that upgrading to 8.2 or 8.3 will allow me to setup a > timeout value for WAL log creation, but upgrading at this time is not an > option for various reasons. > >Any insight that you can provide will be greatly

Re: [GENERAL] initlocation on windows

2008-02-28 Thread conor.mccarthy
Ah ha. Great, thanks. Alvaro Herrera-7 wrote: > > conor.mccarthy escribió: >> >> I'm trying to use initlocation to create a database on a second hard disk >> using a windows installation of postgresql. I can't find this >> initlocation >> program anywhere. Is it possible to do on Windows? Can s

[GENERAL] WAL Log Size

2008-02-28 Thread John Evans
All, I've done some searching in the mailing list archives, and the Internet in general, and come up with a blank. Here's my setup: I'm working on setting up a replication system between two 8.1.11 servers using WAL log shipping via rsync. Nothing special there, but the problem that I'm havi

Re: [GENERAL] "=" or ":=" ?

2008-02-28 Thread Tom Lane
=?ISO-8859-1?Q?BERTRAND_Jo=EBl?= <[EMAIL PROTECTED]> writes: > What is the difference between "=" and ":=" ? None; plpgsql accepts either for assignment. regards, tom lane ---(end of broadcast)--- TIP 2: Don't 'kill -9' the

Re: [GENERAL] Can't start Postgres anymore

2008-02-28 Thread Andrew Sullivan
On Thu, Feb 28, 2008 at 08:38:26AM -0500, Merlin Moncure wrote: > > > I'm using Zonealarm firewall but Postgres is authorized on 127.0.0.1:5432. Sorry, I missed this in the OP. But I've had people tell me that Zonealarm causes them problems even if it's completely turned off. One person told m

Re: [GENERAL] "=" or ":=" ?

2008-02-28 Thread Alvaro Herrera
BERTRAND Joël wrote: > I don't understand last assignations. In pgsql documentation, ther is > written that all assignations have to be written with ":=", not with > "=". What is the difference between "=" and ":=" ? I don't find any > information about "=". It's exactly the same. :=

Re: [GENERAL] initlocation on windows

2008-02-28 Thread Alvaro Herrera
conor.mccarthy escribió: > > I'm trying to use initlocation to create a database on a second hard disk > using a windows installation of postgresql. I can't find this initlocation > program anywhere. Is it possible to do on Windows? Can someone print me to a > copy of initlocation or tell me what

[GENERAL] "=" or ":=" ?

2008-02-28 Thread BERTRAND Joël
Hello, I'm trying to optimize assign_vertex_id() function provided by pgRouting/PostGIS. In this function, I can see : DECLARE points record; i record; source_id int; target_id int; pre varchar; post varchar; srid integer;

Re: [GENERAL] HELP FOR LOADING a .psql file (same question again but explained neatly)

2008-02-28 Thread Colin Wetherbee
akshay bhat wrote: hello i am new to psql or any database stuff. i have downloaded an .psql file from internet and wish to open it and see the data inside. i am working on windows xp and have installed the software successfully. please help i am my wits end. it is huge file 800mb and is suppose

[GENERAL] initlocation on windows

2008-02-28 Thread conor.mccarthy
I'm trying to use initlocation to create a database on a second hard disk using a windows installation of postgresql. I can't find this initlocation program anywhere. Is it possible to do on Windows? Can someone print me to a copy of initlocation or tell me what I'm doing wrong please. Many thank

Re: [GENERAL] Regarding interval conversion functions and a seeming lack of usefulness

2008-02-28 Thread Erik Jones
On Feb 28, 2008, at 6:04 AM, Alban Hertroys wrote: On Feb 27, 2008, at 3:47 PM, Bill Moran wrote: Something like: $ SELECT CONVERT('12 days 13 hours'::INTERVAL AS hour); hour -- 301 $ SELECT CONVERT('6 hours 17 minutes'::INTERVAL AS hour); hour -- 6.2833 Am I approaching this pro

Re: [GENERAL] disabling triggers, constaints and so on

2008-02-28 Thread Erik Jones
On Feb 25, 2008, at 2:33 PM, Geoffrey wrote: We are still in a pickle with trying to resolve our trigger issues without affecting slony triggers. The point is, we need to be able to disable triggers, check constraints, and foreign-key constraints without affecting slony triggers in certa

[GENERAL] beginner: what permissions required to install on windows 2000+

2008-02-28 Thread Dee
What are the permissions required to install postgres as a service on windows 2000/2003? I have followed the instructions, as I understand them, but the program will not install. It either fails with "The application failed to initialize properly (0xc022). Click on OK to terminate the app

Re: [GENERAL] what happens if something goes wrong in transaction?

2008-02-28 Thread Michael Fuhr
On Thu, Feb 28, 2008 at 02:19:01PM +, A B wrote: > Hi. newbie question, but what will happen if I do > > begin work; > select ... > insert ... > and so on... > commit > > and somewhere a query fails. will I get an automatic rollback? After the error every subsequent statement will fail with

Re: [GENERAL] beginner postgis question lat/lon

2008-02-28 Thread Michael Fuhr
On Wed, Feb 27, 2008 at 04:59:07PM -0800, shadrack wrote: > This may seem like a very simple question...it is...but I can't find > documentation on it to help. I've seen some posts about lat/long but > none that give simple solutions on how to insert lat/long in tables. See the PostGIS documentati

Re: [GENERAL] what happens if something goes wrong in transaction?

2008-02-28 Thread Alvaro Herrera
A B escribió: > Hi. newbie question, but what will happen if I do > > begin work; > select ... > insert ... > and so on... > commit > > and somewhere a query fails. will I get an automatic rollback? Of course. -- Alvaro Herrerahttp://www.CommandPrompt.com/ Postg

Re: [GENERAL] beginner postgis question lat/lon

2008-02-28 Thread Martijn van Oosterhout
On Wed, Feb 27, 2008 at 04:59:07PM -0800, shadrack wrote: > postgis=# insert into routes_geom values(1, 'J084', > GeomFromText('LINESTRING(38.20 -121.00, 38.20, -118.00)', 4326)); > > I receive this error: > ERROR: parse error - invalid geometry > CONTEXT: SQL function "geomfromtext" statement 1

[GENERAL] what happens if something goes wrong in transaction?

2008-02-28 Thread A B
Hi. newbie question, but what will happen if I do begin work; select ... insert ... and so on... commit and somewhere a query fails. will I get an automatic rollback? If not, is there a way to get that behaviour? I'm using php to make all these calls and they have all to be succesfull or no one o

Re: [GENERAL] Can't start Postgres anymore

2008-02-28 Thread Merlin Moncure
On Wed, Feb 27, 2008 at 4:08 PM, George Younan <[EMAIL PROTECTED]> wrote: > I have Postgres installed as a service on Windows xp pro. It has been > working fine but suddenly i couldn't start it anymore. I looked in different > forums for a similar problem but didn't find any solution sofar. So any

Re: [GENERAL] UUID-OSSP for windows.

2008-02-28 Thread Michael Glaesemann
On Feb 27, 2008, at 16:59 , Tim Uckun wrote: citext is not part of core PostgreSQL or something we have any intention to include in the Windows distribution at this time. Is there an alternative for people wanting a case insensitive collation? ORDER BY lower(foo) ? Michael Glaesemann g

Re: [GENERAL] How to "paste two tables side-by-side"?

2008-02-28 Thread Sam Mason
On Wed, Feb 27, 2008 at 07:39:51AM -0500, Kynn Jones wrote: > Suppose I have two tables, A and B, with k(A) and k(B) columns respectively, > and let's assume to begin with that they have the same number of rows r(A) = > r(B) = r. > What's the simplest way to produce a table C having r rows and k(A)

Re: [GENERAL] Regarding interval conversion functions and a seeming lack of usefulness

2008-02-28 Thread Alban Hertroys
On Feb 27, 2008, at 3:47 PM, Bill Moran wrote: Something like: $ SELECT CONVERT('12 days 13 hours'::INTERVAL AS hour); hour -- 301 $ SELECT CONVERT('6 hours 17 minutes'::INTERVAL AS hour); hour -- 6.2833 Am I approaching this problem wrong? or is there something out there and my Goo

Re: [GENERAL] debug nonstandard use of \\ in a string literal

2008-02-28 Thread Albe Laurenz
Ivan Zolotukhin wrote: > From time to time I face with these well-known warnings in the > PostgreSQL log, i.e. > > Feb 28 04:21:10 db7 postgres[31142]: [2-1] WARNING: nonstandard use > of escape in a string literal at character 62 > Feb 28 04:21:10 db7 postgres[31142]: [2-2] HINT: Use the escape

Re: [GENERAL] dbi_link and dbi:ODBC

2008-02-28 Thread David Fetter
On Tue, Feb 26, 2008 at 04:07:23PM +0100, Hermann Muster wrote: > I have the following problem getting to connect a remote database (MS SQL > Server in my case) to PostgreSQL. > > I'm using SQL Server 2005 Express Edition. I tried it with the following: > > SELECT dbi_link.make_accessor_functions(

Re: [GENERAL] on update, how to change the value?

2008-02-28 Thread Richard Huxton
A B wrote: Hi. If I have table A (x integer primary key); and table B (y integer references A on delete cascade ); There is an "on update" option to the create table command, but I can't find out if that will help me. The docs are unfortunatly a little short on describing the "on update" opt

[GENERAL] debug nonstandard use of \\ in a string literal

2008-02-28 Thread Ivan Zolotukhin
Hello, >From time to time I face with these well-known warnings in the PostgreSQL log, i.e. Feb 28 04:21:10 db7 postgres[31142]: [2-1] WARNING: nonstandard use of escape in a string literal at character 62 Feb 28 04:21:10 db7 postgres[31142]: [2-2] HINT: Use the escape string syntax for escapes

[GENERAL] on update, how to change the value?

2008-02-28 Thread A B
Hi. If I have table A (x integer primary key); and table B (y integer references A on delete cascade ); and that a new item (x=70) gets inserted into A and a lot of items go into B that references the new item in A. Now, if I really have to do: delete from A where x=5; update A set x=5 where x=7

Re: [GENERAL] HELP FOR LOADING a .psql file (same question again but explained neatly)

2008-02-28 Thread Richard Huxton
akshay bhat wrote: hello i am new to psql or any database stuff. i have downloaded an .psql file from internet and wish to open it and see the data inside. i am working on windows xp and have installed the software successfully. please help i am my wits end. So what have you tried so far? What