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 pgsql-genera

[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] Error: Operator does not exist: "char"=integer

2008-12-17 Thread Scott Marlowe
On Wed, Dec 17, 2008 at 10:26 PM, novnov 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 failing? --

[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 pr

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

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 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.

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 > compl

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 im

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 --

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] 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 produ

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] 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 u

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 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 or -hackers :

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 i

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

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. > > "Rec

[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

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 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 growing. The main utilit

[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

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] 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 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 column > and ther

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 othe

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 wrote: > Hi Allan > > Hi Allan > > I have deleted the Postgres files so I can re-install. Originally I don

[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 nu

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 wrote: > 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 >

[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] Planner hints in SELECT queries?

2008-12-17 Thread Tom Lane
"Dmitry Koterov" 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 pgsql-general mailing

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 dbli

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

[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: SELE

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 didn'

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

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 dbl

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: Mon

Re: [GENERAL] Maximum reasonable free space map

2008-12-17 Thread Greg Stark
On Wed, Dec 17, 2008 at 5:45 AM, Scott Marlowe 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 you have 40M rows and 1

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 s

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 ret

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 c

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 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 for inde

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 Her

[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

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 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 > http://www.enterprisedb

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

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 lin

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

[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 table

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 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 are ever updated, th

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 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 Click Installer") s

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 b

[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 off

[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 transfe