Re: [GENERAL] granting acces to an external client

2007-07-25 Thread Luca Ferrari
On Wednesday 25 July 2007 Sorin N. Ciolofan's cat, walking on the keyboard, wrote: > Hello! > > I'd like to ask you what line should be added in pg_hba.conf file in order > to grant access to a user with ip > 139.100.99.98 to a db named "myDB" with user "scott" with password > "mikepwd"? > This s

Re: [GENERAL] a few questions (and doubts) about xid

2007-07-25 Thread Luca Ferrari
On Wednesday 25 July 2007 Gregory Stark's cat, walking on the keyboard, wrote: > If you really want to understand how snapshots work at this level you could > read (slowly -- it's pretty dense stuff) through > src/backend/utils/time/tqual.c:HeapTupleSatisfiesMVCC() Ok, I need a little hint here:

Re: [GENERAL] using Tsearch2 for chemical text

2007-07-25 Thread Oleg Bartunov
Naz, in posted link to the dict_regex dictionary for tsearch2 http://lynx.sao.ru/~karpov/software/postgres_dict_regex.html Feel free to test it and send us feedback. It's rather general, of course, it uses regex (pcre library). Oleg On Thu, 26 Jul 2007, Naz Gassiep wrote: I think you might

Re: [GENERAL] using Tsearch2 for chemical text

2007-07-25 Thread Oleg Bartunov
On Wed, 25 Jul 2007, Rajarshi Guha wrote: Hi, I have a table with about 9M entries. The table has 2 fields: id and name which are of serial and text types respectively. I have a ordinary index on the text field which allows me to do searches in reasonable time. Most of my searches are of the f

Re: [GENERAL] using Tsearch2 for chemical text

2007-07-25 Thread Naz Gassiep
I think you might need to write a custom lexer to divide the strings into meaningful units. If there are subsections of these names that make sense to search for, then tsearch2 can certainly handle the mechanics of that, but I doubt that the standard rules will divide these names into lexemes u

Re: [GENERAL] Re: invalid memory alloc request size 2147483648 using toode LIKE 'ä%'

2007-07-25 Thread Tom Lane
"Andrus" <[EMAIL PROTECTED]> writes: >> This looks like a problem already reported, and patched here: >> http://archives.postgresql.org/pgsql-committers/2007-05/msg00088.php >> but that fix hasn't made it into any released version yet. > Thank you. > I fixed it in my application by changing index

Re: [GENERAL] C function problem with 8.2.4

2007-07-25 Thread Pavel Stehule
Hello, send source code please, we cannot check any without source. Regards Pavel Stehule 2007/7/25, Anton A. Patrushev <[EMAIL PROTECTED]>: > Hello, > > My C function for Pl/pgsql worked fine until I upgraded to 8.2.4 > version. Now it fails with signal 11 (segmentation fault). > > The problem

[GENERAL] Replicating db structure changes

2007-07-25 Thread Robby Russell
Hey all, I'm catching up the replication options for PostgreSQL and was looking at slony, but was wondering if I could get some pointers. If I understand the slony documentation correctly, it doesn't allow me to send CREATE/ALTER TABLE/INDEX statements to the master and have those replicate

Re: [GENERAL]postgresql insert and dataset(c#)

2007-07-25 Thread Chris
longlong wrote: hi all on windows system ,is there any easy way to insert data from a dataset(c#.net) to postgresql? There's an example in the manual: http://npgsql.projects.postgresql.org/docs/manual/UserManual.htm "Working with Datasets" If you have any problems with it I'd suggest yo

Re: [GENERAL] Porting MySQL data types to PostgreSQL

2007-07-25 Thread Michael Glaesemann
[Please reply to the list so that others may benefit from and participate in the discussion, and please don't top post as it makes the discussion more difficult to follow.] On Jul 25, 2007, at 20:55 , Gautam Sampathkumar wrote: Thank you for your answer. Do you know why a choice w

Re: [GENERAL] Porting MySQL data types to PostgreSQL

2007-07-25 Thread Michael Glaesemann
On Jul 24, 2007, at 12:47 , Gautam Sampathkumar wrote: Does this mean I'd have to essentially double the space occupied by most database columns e.g convert mysql integer to postgresql bigint? Only if your unsigned 4-byte integers actually exceed 2,147,483,647. I suppose you could also us

Re: [GENERAL] using Tsearch2 for chemical text

2007-07-25 Thread Tatsuo Ishii
> Rajarshi Guha <[EMAIL PROTECTED]> writes: > > My problem is that the name column contains names of chemicals. Now > > for many cases this may simply be a number (1674-56-2) and in other > > cases it may be an alphanumeric string (such as (-)O-acetylcarnitine > > or 1,2-cis-dihydroxybenzoate

[GENERAL] C function problem with 8.2.4

2007-07-25 Thread Anton A. Patrushev
Hello, My C function for Pl/pgsql worked fine until I upgraded to 8.2.4 version. Now it fails with signal 11 (segmentation fault). The problem is - I can't find where, 'cause it's working fine if I'm trying to raun postmaster with gdb :( And after I ran it with gdb once, it's working fine withou

[GENERAL] Porting MySQL data types to PostgreSQL

2007-07-25 Thread Gautam Sampathkumar
Hi, I am in the process of porting a MySQL database to PostgreSQL. I was wondering why PostgreSQL does not support unsigned data types? Does this mean I'd have to essentially double the space occupied by most database columns e.g convert mysql integer to postgresql bigint? thanks, Gautam

[GENERAL] Re: invalid memory alloc request size 2147483648 using t oode LIKE 'ä%'

2007-07-25 Thread Andrus
This looks like a problem already reported, and patched here: http://archives.postgresql.org/pgsql-committers/2007-05/msg00088.php but that fix hasn't made it into any released version yet. Thank you. I fixed it in my application by changing index to upper() instead of lower : CREATE UNIQUE IN

Re: [GENERAL] Import excel to postgres based website?

2007-07-25 Thread Gavin M. Roy
Your easiest route will be to have them export a csv file out of excel and write a script to import the csv into the database. On 7/23/07, novnov <[EMAIL PROTECTED]> wrote: The answer may or many not be very postgres specific but...what are some possible routes that I could take to allows user

Re: [GENERAL] upgrade to 8.2.? or implement Slony, which first?

2007-07-25 Thread Joseph S
If you don't mind the downtime it would be simpler to upgrade to 8.2 and then worry about Slony. If you do mind you can use slony to do the upgrade which needs much less downtime as you switch servers. Geoffrey wrote: We plan to upgrade from our current 7.4.17 Postgresql to 8.2.? in the near

[GENERAL] inherting triggers

2007-07-25 Thread Joseph S
I am planning on segmenting one of my large tables into many child tables using "CREATE TABLE ... INHERITS (parent)", but I want all the triggers on my parent table to also fire on UPDATE/INSERT/DELETE on my child table. As far as I can tell, there is no way to do this with the CREATE TABLE co

[GENERAL] upgrade to 8.2.? or implement Slony, which first?

2007-07-25 Thread Geoffrey
We plan to upgrade from our current 7.4.17 Postgresql to 8.2.? in the near future. We also plan to implement a replication solution, most likely Slony. We know that the upgrade to 8.2.? will require some code changes. Question is, is there a particular order in which we should perform these

Re: [GENERAL] using Tsearch2 for chemical text

2007-07-25 Thread Dann Corbit
Tsearch2 is used for full text indexing. It won't be any faster than a btree index like the one you have now (I assume it's unique -- if it isn't then I think it ought to be). If you cluster the table by your index it will speed up your queries. > -Original Message- > From: [EMAIL PROTEC

Re: [GENERAL] using Tsearch2 for chemical text

2007-07-25 Thread Tom Lane
Rajarshi Guha <[EMAIL PROTECTED]> writes: > My problem is that the name column contains names of chemicals. Now > for many cases this may simply be a number (1674-56-2) and in other > cases it may be an alphanumeric string (such as (-)O-acetylcarnitine > or 1,2-cis-dihydroxybenzoate). In some

[GENERAL] using Tsearch2 for chemical text

2007-07-25 Thread Rajarshi Guha
Hi, I have a table with about 9M entries. The table has 2 fields: id and name which are of serial and text types respectively. I have a ordinary index on the text field which allows me to do searches in reasonable time. Most of my searches are of the form select * from mytable where name ~

[GENERAL] granting acces to an external client

2007-07-25 Thread Sorin N. Ciolofan
Hello! I'd like to ask you what line should be added in pg_hba.conf file in order to grant access to a user with ip 139.100.99.98 to a db named "myDB" with user "scott" with password "mikepwd"? After modifying this file is enough to issue pg_ctl reload or should I restart postgres? Thank you Wi

Re: [GENERAL] running a script from a command line

2007-07-25 Thread Pavel Stehule
Hello Is there a way to create a database and add tables to it that doesn't require the password prompt? I didn't see a command line parameter that allowed you to just enter a password in the command line. look http://www.postgresql.org/docs/8.2/interactive/libpq-pgpass.html The applicati

[GENERAL] running a script from a command line

2007-07-25 Thread Joe L
Hi, I want to use postgres as part of my application. I need to create a database and initialize it and fill it with data as part of the installation process. There is information that is expected to be there. Now when I try to use psql from a batch script it always prompts for a password.

[GENERAL] silent install of postgres for an embedded purposes

2007-07-25 Thread Stephen Ince
Hi. I am new to postgres and I am porting an application to windows that is using postgresql as it's backend. I am also trying to do a silent install of postgres. I would also like to install postgres on a usb thumbdrive. It is just for demo purposes. 1) Can you have more than one instance of

Re: [GENERAL] CentOS 4 RPMs for 8.2.4?

2007-07-25 Thread Devrim GÜNDÜZ
Hi, On Sat, 2007-07-21 at 15:57 -0700, Steve Wampler wrote: > I need the Java and Python interfaces supplied with > (from 8.1.9): > >postgresql-jdbc-8.1.4-1.centos.1 >postgresql-python-8.1.9-1.el4s1.1 The actual problem is I did not build jdbc packages for latest releases. I just buil

[GENERAL] More than one characters in DELIMITER (for COPY)

2007-07-25 Thread L. Berger
Hi, We have data where all the characters on the keyboard are used. The data is utf-8, so all of those European characters with umlauts and such are also used. Because of this we have {~} as the delimiter, even {} was taken! Now when I try to specify this delimiter in the COPY command to import t

Re: [GENERAL] a few questions (and doubts) about xid

2007-07-25 Thread Alvaro Herrera
Gregory Stark wrote: > > Just for confirmation: the relfrozenxid of a fresh table is the xid of the > > transaction that created it, isn't it? > > Yes, easily enough checked: > > postgres=# create table xyz (i integer); > CREATE TABLE > postgres=# select xmin,relfrozenxid from pg_class where re

Re: [GENERAL] Backslah in encrypt function.

2007-07-25 Thread Michael Fuhr
On Wed, Jul 25, 2007 at 06:02:10PM +0530, Nalin Bakshi wrote: >I have come on a problem regarding encryption. I am firing a simple > select statement: > > select encrypt('\\','abcd','bf'); > > I want to use \ for encryption but I get the error: >"invalid input syntax for type byt

Re: [GENERAL] a few questions (and doubts) about xid

2007-07-25 Thread Gregory Stark
"Luca Ferrari" <[EMAIL PROTECTED]> writes: >> If you really want to understand how snapshots work at this level you could >> read (slowly -- it's pretty dense stuff) through >> src/backend/utils/time/tqual.c:HeapTupleSatisfiesMVCC() > > I don't find it, I think you mean HeapTupleSatisfiesNow and

Re: [GENERAL] a few questions (and doubts) about xid

2007-07-25 Thread Luca Ferrari
Thanks Gregory, thanks Simon. I'm trying to read the tqual.c source file to better understand. On Wednesday 25 July 2007 Gregory Stark's cat, walking on the keyboard, wrote: > If you really want to understand how snapshots work at this level you could > read (slowly -- it's pretty dense stuff) thr

[GENERAL] Backslah in encrypt function.

2007-07-25 Thread Nalin Bakshi
Hi, I have come on a problem regarding encryption. I am firing a simple select statement: select encrypt('\\','abcd','bf'); I want to use \ for encryption but I get the error: "invalid input syntax for type bytea" I tried using to encrypt \ , but on decryption I get \\ inst

Re: [GENERAL] a few questions (and doubts) about xid

2007-07-25 Thread Simon Riggs
On Tue, 2007-07-24 at 19:51 +0200, Luca Ferrari wrote: > Now, for subtrans the xid is laizyly obtained, due to efficiency purposes. > But > in such way subtrans xid should be greater than each other xid of concurrent > (main) transactions. If the subtrans inserts a record is the subtrans xid >

[GENERAL]postgresql insert and dataset(c#)

2007-07-25 Thread longlong
hi all on windows system ,is there any easy way to insert data from a dataset(c#.net) to postgresql? i have installed npgsql.dll.

Re: [GENERAL] Delete/update with limit

2007-07-25 Thread Csaba Nagy
On Tue, 2007-07-24 at 19:06, Stephan Szabo wrote: > > Unfortunately I don't think this will work. Multiple backends will happily > > pick up the same ctid in their selects and then try to delete the same > > records. > > I'm pretty sure he said that the batch processing (and the delete) would > on

Re: [GENERAL] a few questions (and doubts) about xid

2007-07-25 Thread Gregory Stark
"Luca Ferrari" <[EMAIL PROTECTED]> writes: > In short each transaction with xmin<=xid<=xmax can see such tuple, > otherwise it cannot (of course beeing xmin and xmax different transtaction > from xid and beeing committed), isn't it? No, it's more complicated than that. We can't simply compare x

Re: [GENERAL] Will partial index creation use existing index?

2007-07-25 Thread Gregory Stark
"Ron Johnson" <[EMAIL PROTECTED]> writes: >> The main disadvantage is that it's not clear when it would actually be >> faster. >> Generally index scans are slower than reading the whole table and sorting. >> Probably it would have to run an SPI query to use the planner to find the >> best >> way

Re: [GENERAL] ssl connections to postgresql

2007-07-25 Thread Albe Laurenz
James B. Byrne wrote: > > I have setup postgresql to use ssl and have configured and > restarted the service without error. I am connecting a web app > from a remote httpd host and I would like to verify that > the connection between these two machines is indeed > employing ssl for the applicati