[GENERAL] Copy/delete issue

2008-12-17 Thread Herouth Maoz
I have a strange situation that occurs every now and again. We have a reports system that gathers all the data from our various production systems during the night, where we can run heavy reports on it without loading the production databases. I have two shell scripts that do this nightly

[GENERAL] A bit confused about Postgres Plus

2008-12-17 Thread Thomas Kellerer
Hi, as the Enterprise DB distribution (One Click Installer) seems to be the recommendation from the Postgres team for a binary download, I wonder what the exact difference between Postgres and Postgres Plus is. I can't find a direct comparison (feature matrix) of the three EnterpriseDB

[GENERAL] Composite type evaluates to Null if any element is null

2008-12-17 Thread Ketema Harris
I have just re-read chapter 8.15 of the 8.3 manual and I am understanding why a composite type would evaluate to NUll if any of it elements are null. Can anyone explain this behavior? To me if I have a composite type column and there are some values in it, its incomplete, yes, but not

Re: [GENERAL] Lost password

2008-12-17 Thread Allan Kamau
That is a windows user account problem, you will need to have Windows administrative privileges to reset the password for user postgres. Allan. On Wed, Dec 17, 2008 at 5:15 PM, Martin Roach martin_roach2...@yahoo.com.au wrote: Hi Allan Hi Allan I have deleted the Postgres files so I can

Re: [GENERAL] what happens to indexes when TRUNCATEing

2008-12-17 Thread Willy-Bas Loos
someone asked the same question here not so long time ago Sorry about that, I searched my personal archive, which goes back until oct 2006, and google, before I asked. Must have missed it then. Thx for the insight! WBL -- Patriotism is the conviction that your country is superior to all

[GENERAL] Prevent new timeline during archive recovery

2008-12-17 Thread Jonatan Evald Buus
Greetings, We're currently developing an alternative to pg_standby, internally named pg_ha. pg_ha uses Record Based Log Shipping fetched by the warm standby server at millisecond intervals and will automatically restore completed WAL files on the standby server to minimize the time required when

Re: [GENERAL] A bit confused about Postgres Plus

2008-12-17 Thread Peter Eisentraut
On Wednesday 17 December 2008 11:40:18 Thomas Kellerer wrote: as the Enterprise DB distribution (One Click Installer) seems to be the recommendation from the Postgres team for a binary download, I wonder what the exact difference between Postgres and Postgres Plus is. There is actually a bit

Re: [GENERAL] Off Topic: MS Access and SSL to access PostgreSQL

2008-12-17 Thread Andrew Gould
Please disregard. I found an SSL option in the ODBC driver configuration. On Wed, Dec 17, 2008 at 9:18 AM, Andrew Gould andrewlylego...@gmail.comwrote: Is anyone using MS Access and SSL to access a PostgreSQL server? If so, how did you get MS Access to use SSL? Thanks, Andrew

Re: [GENERAL] Composite type evaluates to Null if any element is null

2008-12-17 Thread Merlin Moncure
On Wed, Dec 17, 2008 at 12:23 PM, Andrew Gould andrewlylego...@gmail.com wrote: What are composite types used for? Do they allow you to search multiple fields for a value more easily? A number of things really. Starting with 8.4, they can be used with indexes and comparisons. so the list is

Re: [GENERAL] PostgreSQL installation

2008-12-17 Thread Grzegorz Jaśkiewicz
just create one , dump it to a file, and restore after pg instalation. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Planner hints in SELECT queries?

2008-12-17 Thread Dmitry Koterov
Hello. Sometimes I have to create the following SQL code: SET something=off; SET other=off; SELECT * FROM ... ORDER BY id LIMIT 10; RESET something; RESET something; (e.g. something may be equal to seq_page_cost=10). I propose to add the SELECT clause to do it natively, like this: SELECT

Re: [GENERAL] PostgreSQL installation

2008-12-17 Thread Shahbaz A. Tyagi
Hi, How can I create the user and database schema? While creating user it's taking automatically windows log in account name. I am using ant for the same purpose. Thanks, Shahbaz A. Tyagi Sphere Networks -Original Message- From: Grzegorz Jaśkiewicz [mailto:gryz...@gmail.com] Sent:

Re: [GENERAL] Other queries locked out during long insert

2008-12-17 Thread Peter Eisentraut
On Wednesday 17 December 2008 12:18:04 Joshua J. Kugler wrote: Begin Truncate table1, table2 for row in file1: insert into table1 sleep(0.001) # see note below for row in file2: insert into table2 sleep(0.001) # see note below Commit During the time where the insert

Re: [GENERAL] Is this a security risk?

2008-12-17 Thread Adam Witney
On 17 Dec 2008, at 14:44, Albe Laurenz wrote: Adam Witney wrote: I would like to provide a limited view of my database to some users, so i thought of creating a second database (I can control access by IP address through pg_hba.conf) with some views that queried the first database using

[GENERAL] what happens to indexes when TRUNCATEing

2008-12-17 Thread Willy-Bas Loos
What happens to indexes on a table that is TRUNCATEd? They are truncated too. From the manual: Furthermore, [truncate] reclaims disk space immediately, rather than requiring a subsequent VACUUM operation. Does this go for indexes too? Thx, WBL -- Patriotism is the conviction that your

[GENERAL] Syntax error with select statement

2008-12-17 Thread aravind chandu
Hello, I have problem with select statement in c++ program I am using pqxx library to connect to postgresql database.My query is result R(T.exec( select * from dbtable where username = ' +user+ ' and password = ' +st+ ' )); here st is in encrypted format and

Re: [GENERAL] A bit confused about Postgres Plus

2008-12-17 Thread Thomas Kellerer
Alvaro Herrera wrote on 17.12.2008 13:28: Thomas Kellerer wrote: as the Enterprise DB distribution (One Click Installer) seems to be the recommendation from the Postgres team for a binary download, I wonder what the exact difference between Postgres and Postgres Plus is. Recommendation?

Re: [GENERAL] Other queries locked out during long insert

2008-12-17 Thread Joshua J. Kugler
On Wednesday 17 December 2008, Peter Eisentraut said something like: Because the TRUNCATE commands are taking out an exclusive lock on the tables. My understanding of MVCC is that I should be able to query against those tables while these insert loops are in their transaction. You get the

Re: [GENERAL] Composite type evaluates to Null if any element is null

2008-12-17 Thread Merlin Moncure
On Wed, Dec 17, 2008 at 11:09 AM, Ketema Harris ket...@ketema.net wrote: I have just re-read chapter 8.15 of the 8.3 manual and I am understanding why a composite type would evaluate to NUll if any of it elements are null. Can anyone explain this behavior? To me if I have a composite type

Re: [GENERAL] what happens to indexes when TRUNCATEing

2008-12-17 Thread Grzegorz Jaśkiewicz
On Wed, Dec 17, 2008 at 11:37 AM, Willy-Bas Loos willy...@gmail.com wrote: What happens to indexes on a table that is TRUNCATEd? They are truncated too. From the manual: Furthermore, [truncate] reclaims disk space immediately, rather than requiring a subsequent VACUUM operation. Does this go

Re: [GENERAL] Planner hints in SELECT queries?

2008-12-17 Thread Tom Lane
Dmitry Koterov dmi...@koterov.ru writes: I propose to add the SELECT clause to do it natively, like this: SELECT * FROM tbl ORDER BY id LIMIT 10 SETTING something=off, other=off Use a function with a SET clause attached. regards, tom lane -- Sent via

Re: [GENERAL] Syntax error with select statement

2008-12-17 Thread justin
aravind chandu wrote: Hello, I have problem with select statement in c++ program I am using pqxx library to connect to postgresql database.My query is result R(T.exec( select * from dbtable where username = ' +user+ ' and password = ' +st+ ' )); here st is in

Re: [GENERAL] Need help to dynamically access to colomns in function!

2008-12-17 Thread Sam Mason
On Tue, Dec 16, 2008 at 11:37:17PM +0300, wrote: Hello. I have table classif with columns: ... , group1, group2, group3, ... , group48, ... In function i do query and want run on every row and dynamically operate on columns from group1 to group20. I do something like this: It

Re: [GENERAL] what happens to indexes when TRUNCATEing

2008-12-17 Thread Willy-Bas Loos
What happens to indexes on a table that is TRUNCATEd? They are truncated too. From the manual: Furthermore, [truncate] reclaims disk space immediately, rather than requiring a subsequent VACUUM operation. Does this go for indexes too? Thx, WBL -- Patriotism is the conviction that your country

Re: [GENERAL] what happens to indexes when TRUNCATEing

2008-12-17 Thread Grzegorz Jaśkiewicz
On Wed, Dec 17, 2008 at 4:44 PM, Willy-Bas Loos willy...@gmail.com wrote: someone asked the same question here not so long time ago Sorry about that, I searched my personal archive, which goes back until oct 2006, and google, before I asked. Must have missed it then. must have been either irc

Re: [GENERAL] Is this a security risk?

2008-12-17 Thread Adam Witney
On 17 Dec 2008, at 07:48, Albe Laurenz wrote: Adam Witney wrote: I would like to provide a limited view of my database to some users, so i thought of creating a second database (I can control access by IP address through pg_hba.conf) with some views that queried the first database using

Re: [GENERAL] A bit confused about Postgres Plus

2008-12-17 Thread Dave Page
On Wed, Dec 17, 2008 at 10:31 AM, Thomas Kellerer spam_ea...@gmx.net wrote: It's a bit confusing that the documentation link on the right hand side _seems_ to relate to the current product (which it doesn't) and then includes the compatibility guide. Maybe you should have column on

Re: [GENERAL] Syntax error with select statement

2008-12-17 Thread Joshua J. Kugler
On Wednesday 17 December 2008, justin said something like: aravind chandu wrote: Hello, I have problem with select statement in c++ program I am using pqxx library to connect to postgresql database.My query is result R(T.exec( select * from dbtable where username =

Re: [GENERAL] Isolating a record column from a PL-Pgsql function call ?

2008-12-17 Thread Gauthier, Dave
Wheeew! OK, that does work. This knowlege creates new options for doing other stuff on my plate. Thanks to all who responded ! -dave -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Sam Mason Sent: Wednesday, December

Re: [GENERAL] Other queries locked out during long insert

2008-12-17 Thread Martijn van Oosterhout
On Wed, Dec 17, 2008 at 01:18:04AM -0900, Joshua J. Kugler wrote: I've read the Pg docs about MVCC and possible locks that indexes can create. Even so, I can't figure out why my code is causing all other queries to block while it is running. I'm reading data in from a file (line by line,

Re: [GENERAL] Composite type evaluates to Null if any element is null

2008-12-17 Thread Andrew Gould
What are composite types used for? Do they allow you to search multiple fields for a value more easily? Thanks, Andrew

Re: [GENERAL] Maximum reasonable free space map

2008-12-17 Thread Greg Stark
On Wed, Dec 17, 2008 at 5:45 AM, Scott Marlowe scott.marl...@gmail.com wrote: If you've got 40M rows and 10% are updated each day, then it's likely you'll want 4M fsm entries avaialble for those dead rows. FWIW you only need an entry for each *page* of the table, not every row. Of course if

Re: [GENERAL] A bit confused about Postgres Plus

2008-12-17 Thread Dave Page
Hi On Wed, Dec 17, 2008 at 9:40 AM, Thomas Kellerer spam_ea...@gmx.net wrote: Hi, These are really questions for us (EnterpriseDB rather than pgsql-general) - especially as none of the pricing or support pages are linked directly from postgresql.org. as the Enterprise DB distribution (One

Re: [GENERAL] what happens to indexes when TRUNCATEing

2008-12-17 Thread Alvaro Herrera
Willy-Bas Loos escribió: What happens to indexes on a table that is TRUNCATEd? They are truncated too. From the manual: Furthermore, [truncate] reclaims disk space immediately, rather than requiring a subsequent VACUUM operation. Does this go for indexes too? Yes. -- Alvaro Herrera

Re: [GENERAL] Isolating a record column from a PL-Pgsql function call ?

2008-12-17 Thread Sam Mason
On Tue, Dec 16, 2008 at 01:03:05PM -0700, Gauthier, Dave wrote: The example I gave was overly simplistic. I actually want to look at more than one of the columns in the returned record, so rewritting it to return an int won't address the need for the other columns. And no, it does not return

[GENERAL] Other queries locked out during long insert

2008-12-17 Thread Joshua J. Kugler
I've read the Pg docs about MVCC and possible locks that indexes can create. Even so, I can't figure out why my code is causing all other queries to block while it is running. I'm reading data in from a file (line by line, its CSV), doing a little pre-processing, and inserting it into a

Re: [GENERAL] Is this a security risk?

2008-12-17 Thread Albe Laurenz
Adam Witney wrote: I would like to provide a limited view of my database to some users, so i thought of creating a second database (I can control access by IP address through pg_hba.conf) with some views that queried the first database using dblink. In my opinion dblink is not the right

[GENERAL] Off Topic: MS Access and SSL to access PostgreSQL

2008-12-17 Thread Andrew Gould
Is anyone using MS Access and SSL to access a PostgreSQL server? If so, how did you get MS Access to use SSL? Thanks, Andrew

Re: [GENERAL] PostgreSQL installation

2008-12-17 Thread Marc Schablewski
http://pginstaller.projects.postgresql.org/silent.html We did that in one of our setups. It works, but has some limitations. For example, you cannot set a global encoding via the command line (its a known installer bug in 8.3.4/8.3.5). And it didn't worked for us on some w2k3 servers, if you

Re: [GENERAL] Maximum reasonable free space map

2008-12-17 Thread Grzegorz Jaśkiewicz
On Wed, Dec 17, 2008 at 5:45 AM, Scott Marlowe scott.marl...@gmail.com wrote: It's all about the size of your tables. If you've got 1 table with 100k rows that's updated a lot then an fsm of 100k is likely reasonable, assuming you've got autovac keeping things in check. Got 4G rows but none

Re: [GENERAL] Copy/delete issue

2008-12-17 Thread Adrian Klaver
On Wednesday 17 December 2008 12:38:40 am Herouth Maoz wrote: I have a strange situation that occurs every now and again. We have a reports system that gathers all the data from our various production systems during the night, where we can run heavy reports on it without loading the

Re: [GENERAL] A bit confused about Postgres Plus

2008-12-17 Thread Thomas Kellerer
Hi Dave, Dave Page, 17.12.2008 11:05: These are really questions for us (EnterpriseDB rather than pgsql-general) - especially as none of the pricing or support pages are linked directly from postgresql.org. Yes, partially :) But then the upgrade path from Postgres to the Advanced Server is a

Re: [GENERAL] Need help to dynamically access to colomns in function!

2008-12-17 Thread David Fetter
On Tue, Dec 16, 2008 at 11:37:17PM +0300, Иван Марков wrote: Hello. I have table classif with columns: ... , group1, group2, group3, ... , group48, ... That's a very poor design because it's both denormalized and has very poor naming. There are likely plenty of other things wrong with it, too.

Re: [GENERAL] pglib.dll for windows ce

2008-12-17 Thread Craig Ringer
Julius Tuskenis wrote: I'm writing a program to be run on WinCE. Are there dll's for wince client (pglib.dll and others)? Sorry - its libpq.dll If you're otherwise unsuccessful, you may want to look into using a JDBC-ODBC bridge driver. Ugly, but probably effective. -- Craig Ringer -- Sent

Re: [GENERAL] pglib.dll for windows ce

2008-12-17 Thread Craig Ringer
Julius Tuskenis wrote: I'm writing a program to be run on WinCE. Are there dll's for wince client (pglib.dll and others)? Er - forget the previous suggestion. Pg's JDBC driver also uses libpq and thus won't work on WinCE w/o a libpq port. For some reason I was thinking it was a pure Java

Re: [GENERAL] Prevent new timeline during archive recovery

2008-12-17 Thread Simon Riggs
On Wed, 2008-12-17 at 17:54 +0100, Jonatan Evald Buus wrote: Greetings, We're currently developing an alternative to pg_standby, internally named pg_ha. pg_ha uses Record Based Log Shipping fetched by the warm standby server at millisecond intervals and will automatically restore completed

Re: [GENERAL] A bit confused about Postgres Plus

2008-12-17 Thread Simon Riggs
On Wed, 2008-12-17 at 10:05 +, Dave Page wrote: On Wed, Dec 17, 2008 at 9:40 AM, Thomas Kellerer spam_ea...@gmx.net wrote: Hi, These are really questions for us (EnterpriseDB rather than pgsql-general) - especially as none of the pricing or support pages are linked directly from

Re: [GENERAL] A bit confused about Postgres Plus

2008-12-17 Thread Joshua D. Drake
On Wed, 2008-12-17 at 23:33 +, Simon Riggs wrote: On Wed, 2008-12-17 at 10:05 +, Dave Page wrote: A free market is better for consumers and an even playing field is the best way to cooperate. I'm sure it wouldn't be much use if everybody stopped writing patches and concentrated on

[GENERAL] Error: Operator does not exist: char=integer

2008-12-17 Thread novnov
I have restored a postgres 8.2.4-1 db onto a postgres 8.3.1-1 server, and when I try to work with a table I get this error: Error: Operator does not exist: char = integer Hopefully that is enough of a clue to be useful. Maybe this is the first time I've tried moving one of my non-trivial pg

Re: [GENERAL] Error: Operator does not exist: char=integer

2008-12-17 Thread Scott Marlowe
On Wed, Dec 17, 2008 at 10:26 PM, novnov novnov...@gmail.com wrote: I have restored a postgres 8.2.4-1 db onto a postgres 8.3.1-1 server, and when I try to work with a table I get this error: Error: Operator does not exist: char = integer What's the schema of the table, and the query that is

[GENERAL] text_soundex function

2008-12-17 Thread Otandeka Simon Peter
Does this function(text_soundex) exist in the latest Postgresql versions or it was replaced? Any example on how to use it?

Re: [GENERAL] text_soundex function

2008-12-17 Thread Chris
Otandeka Simon Peter wrote: Does this function(text_soundex) exist in the latest Postgresql versions or it was replaced? It's called soundex: http://www.postgresql.org/docs/8.3/interactive/fuzzystrmatch.html -- Postgresql php tutorials http://www.designmagick.com/ -- Sent via