[GENERAL] SSL connection between PHP4 & PostgreSQL ???

2004-10-05 Thread Mike Morris
Hi, I've setup a postgres server (7.4) and confirmed that SSL is enabled - I can successfully connect via tcp socket over SSL using the psql client. >From PHP4, how can I get the pg_connect function to negotiate an SSL connection? I gather from researching the issue that pg_connect uses the sa

Re: [GENERAL] SSL connection between PHP4 & PostgreSQL ???

2004-10-05 Thread Mike Nolan
> >From PHP4, how can I get the pg_connect function to negotiate an SSL connection? > > I gather from researching the issue that pg_connect uses the same libraries as psql, > so that > this should be possible. But I've tried every syntax I can think of... the "options" > parameter to > pg_conn

Re: [GENERAL] SSL connection between PHP4 & PostgreSQL ???

2004-10-05 Thread Joshua D. Drake
Mike Morris wrote: Hi, I've setup a postgres server (7.4) and confirmed that SSL is enabled - I can successfully connect via tcp socket over SSL using the psql client. From PHP4, how can I get the pg_connect function to negotiate an SSL connection? Hello, Have not done this in a while but I beli

Re: [GENERAL] current transaction is aborted, commands ignored until end of transaction block

2004-10-05 Thread Michael Fuhr
On Tue, Oct 05, 2004 at 07:54:23AM +0200, ruben wrote: > After upgrading 7.4.2 to 7.4.5 quite smoothly in a Red Hat 8.0 box, we > are having intermitent issues with certain online PHP transactions, > returning this error: > > "Warning: pg_exec() query failed: ERROR: current transaction is abort

Re: [GENERAL] guaranteeing that a sequence never skips

2004-10-05 Thread Andre Maasikas
>Sometimes a business requirement is that a serial sequence >never skips, >e.g. when generating invoice/ticket/formal letter numbers. Would an >INSERT INTO t (id, ...) VALUES (SELECT MAX(col)+1 FROM t, ...) >suffice, >or must I install a trigger too to do additional checking? > If id is defin

Re: [GENERAL] current transaction is aborted, commands ignored until

2004-10-05 Thread [EMAIL PROTECTED]
Hi Michael: Michael Fuhr wrote: After upgrading 7.4.2 to 7.4.5 quite smoothly in a Red Hat 8.0 box, we are having intermitent issues with certain online PHP transactions, returning this error: "Warning: pg_exec() query failed: ERROR: current transaction is aborted, commands ignored until end of

[GENERAL] table localisation

2004-10-05 Thread frederic . germaneau
Hi, I'm trying to create a database with 2 tableSpaces one for data table and one other for indexes I have created a schema on my tablespace for datas and a table in this schema, I would like to verify that this table is on the right tablespace. I don't know how to do that. \d , \d+ , \db+ don'

[GENERAL] more than one instance of pgpool for a backend?

2004-10-05 Thread Janning Vygen
Hi, pgpool seems to be very nice. I will use it in production environment as soon as possible, but have a question regarding pgpool: I have four different databases/user combinations which should have different numbers of possible connection. let my db have 80 concurrent connections and i wan

Re: [GENERAL] LOST REFERENTIAL INTEGRITY

2004-10-05 Thread Marco Colombo
On Mon, 4 Oct 2004, Tom Lane wrote: "Jimmie H. Apsey" <[EMAIL PROTECTED]> writes: I'd recommend an upgrade to 7.4.5 at your earliest convenience. I have kept up-to-date our Red Hat kernels as you can probably see from the Linux 2.4.9-e.49smp kernel. Am I required to maintain my own version of Post

[GENERAL] Function array_to_string(text[], text) does not exist ???

2004-10-05 Thread Johann Robette
Hi,   I’m trying to call the array_to_string function like this :     SELECT array_to_string(array[1, 2, 3], '~^~') à it comes directly from the doc. I get this error msg :     ERROR:  parser: parse error at or near "[" at character 24   So I tried this way

Re: [GENERAL] Random not so random

2004-10-05 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, Bruno Wolff III <[EMAIL PROTECTED]> writes: > On Mon, Oct 04, 2004 at 10:14:19 -0400, > Tom Lane <[EMAIL PROTECTED]> wrote: >> >> It occurs to me that you might be seeing predictability as an indirect >> result of something else you are doing that somehow tends t

Re: [GENERAL] Function array_to_string(text[], text) does not exist ???

2004-10-05 Thread Michael Fuhr
On Tue, Oct 05, 2004 at 12:07:11PM +0200, Johann Robette wrote: > I'm trying to call the array_to_string function like this : > SELECT array_to_string(array[1, 2, 3], '~^~') --> it comes > directly from the doc. > I get this error msg : > ERROR: parser: parse error at or

RE : [GENERAL] Function array_to_string(text[], text) does not exist ???

2004-10-05 Thread Johann Robette
Ok, that must be it. In fact I was originally using 7.3 but I thought that we've upgraded to 7.4 but apparently note. What I would do is upgrade it and it should work... Thanls -Message d'origine- De : Michael Fuhr [mailto:[EMAIL PROTECTED] Envoyé : mardi 5 octobre 2004 15:06 À : Johann

Re: [GENERAL] Random not so random

2004-10-05 Thread Michael Fuhr
On Tue, Oct 05, 2004 at 02:39:13PM +0200, Harald Fuchs wrote: > I think we don't need the randomness provided by /dev/[u]random. How > about XORing in getpid? What about making the seeding mechanism and perhaps random()'s behavior configurable? -- Michael Fuhr http://www.fuhr.org/~mfuhr/

Re: [GENERAL] table localisation

2004-10-05 Thread Tom Lane
[EMAIL PROTECTED] writes: > I have created a schema on my tablespace for datas and a table in this > schema, I would like to verify that this table is on the right tablespace. > I don't know how to do that. > \d , \d+ , \db+ don't show this information Maybe you're using an old copy of psql? I'

[GENERAL] Mailing

2004-10-05 Thread Todd P Marek
Hello- I am in the process of translating a site using mysql as the backend over to postgres. I have a lot of time data that I would like to display to the user in the form of a schedule. I am using the to_char function to make the times human friendly to_char(class_schedule.endtime, 'HH:MI:S

Re: [GENERAL] Random not so random

2004-10-05 Thread Tom Lane
Harald Fuchs <[EMAIL PROTECTED]> writes: >> Tom Lane <[EMAIL PROTECTED]> wrote: It might improve matters to make the code do something like srandom((unsigned int) (now.tv_sec ^ now.tv_usec)); > I think we don't need the randomness provided by /dev/[u]random. How > about XORing in getpid

Re: [GENERAL] Mailing

2004-10-05 Thread Stephen Frost
* Todd P Marek ([EMAIL PROTECTED]) wrote: > I have looked through the documentation and haven't found anything to > do this in postgres. I am going to have to do this formating in the > application layer? If nothing else I'd think you could create your own function in Postgres to display the ti

Re: [GENERAL] Mailing

2004-10-05 Thread Csaba Nagy
I would thought it would be an obvious try: cnagy=> select to_char(now(), 'HH:MM AM'); to_char -- 04:10 PM (1 row) HTH, Csaba. On Tue, 2004-10-05 at 16:32, Todd P Marek wrote: > Hello- > > I am in the process of translating a site using mysql as the > backendover to postgres. I hav

Re: [GENERAL] Mailing

2004-10-05 Thread Tom Lane
Todd P Marek <[EMAIL PROTECTED]> writes: > I am using the to_char function to make the times human friendly > to_char(class_schedule.endtime, 'HH:MI:SS AM') > which returns > 06:30:00 AM - 07:30:00 AM > I am really looking to get it outputting like this. > 6:30 AM - 7:30 AM > I

Re: [GENERAL] Mailing

2004-10-05 Thread Stephan Szabo
On Tue, 5 Oct 2004, Todd P Marek wrote: > Hello- > > I am in the process of translating a site using mysql as the backend > over to postgres. I have a lot of time data that I would like to > display to the user in the form of a schedule. > > I am using the to_char function to make the times huma

Re: [GENERAL] Mailing

2004-10-05 Thread Robby Russell
On Tue, 2004-10-05 at 09:32 -0500, Todd P Marek wrote: > > > __ > > Hello- > > I am in the process of translating a site using mysql as the backend > over to postgres. I have a lot of time data that I would like to > display t

Re: [GENERAL] Mailing

2004-10-05 Thread Kevin Barnard
SELECT trim(leading '0' from to_char(now(), 'HH:MM AM')) I think is what you really want. This gets rid of the nasty leasing 0. ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs

Re: [GENERAL] Mailing

2004-10-05 Thread Todd P Marek
On Oct 5, 2004, at 10:00 AM, Kevin Barnard wrote: SELECT trim(leading '0' from to_char(now(), 'HH:MM AM')) I think is what you really want. This gets rid of the nasty leasing 0. I wasn't even paying attention to the seconds. I was in fact talking about the leading 0. Thanks to everyone and apo

Re: [GENERAL] Mailing

2004-10-05 Thread Csaba Nagy
Hey, I didn't know "trim" is so flexible... cool ! Cheers, Csaba. On Tue, 2004-10-05 at 17:00, Kevin Barnard wrote: > SELECT trim(leading '0' from to_char(now(), 'HH:MM AM')) > > I think is what you really want. This gets rid of the nasty leasing 0. > > ---(end of broa

Re: [GENERAL] Mailing

2004-10-05 Thread Kevin Barnard
Going back to the documents I think Tom's answer of prepending FM is better then mine.Look at table 9-22 for other options On Tue, 5 Oct 2004 10:06:51 -0500, Todd P Marek <[EMAIL PROTECTED]> wrote: > > > > On Oct 5, 2004, at 10:00 AM, Kevin Barnard wrote: > > > SELECT trim(leading '0' fro

[GENERAL] postgresql 8.0 and tsearch2 install under cygwin

2004-10-05 Thread Marek Lewczuk
Hello, I've just made successful installation of PostgreSQL 8.0 on Cygwin but I have some problems with installing tsearch2 contrib module. This is what make produce: dict_ispell.o(.text+0x1ec):dict_ispell.c: undefined reference to `_pg_strcasecmp ' dict_ispell.o(.text+0x31e):dict_ispell.c: und

[GENERAL] Set locale per query?

2004-10-05 Thread Rigmor Ukuhe
Hi, Is there a way to set locale per query (i use latest JDBC drivers). I am in situation, where we need to make ORDER BY querys over data that is in various langages - English, Russian, Estonian, Latvian. I know that there are issues with indexing that column in such case, but what are my options

[GENERAL] looking for Mac pgEdit beta testers

2004-10-05 Thread John DeSoi
Hi, I'm working on a new product for PostgreSQL (description below) and I'm looking for a few more Mac users who might be interested in beta testing. The first release will be for Mac OS X 10.2 or later. A Windows version will follow, most likely in November. Drop me an email if you can spare a

[GENERAL] storage representation of DATE and TIME types

2004-10-05 Thread Dennis Gearon
please cc me as I am on digetst: What is the storage format of 'date'? Is it like a timestamp? I want to know in order to choose representations in a table that will receive LOTS of reads with a WHERE clause that chooses dates, and TIMES, past a supplied reference

[GENERAL] Postgres 8.0 + JDBC

2004-10-05 Thread Johann Robette
Hello,   I have an application running under JBoss. Up to today, I was using Postgres 7.3 and the appropriate version of the jdbc driver. In my application, I have to call a user-defined function which accept in parameters 2 arrays. Here is the header of my function :    

Re: [GENERAL] Random not so random

2004-10-05 Thread Dann Corbit
A better way would be to seed a Mersenne Twister PRNG at server startup time and then use the same generator for all subsequent calls. http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html The period is exceptionally long, and it has many excellent properties. > -Original Message- > Fr

Re: [GENERAL] Set locale per query?

2004-10-05 Thread Tom Lane
"Rigmor Ukuhe" <[EMAIL PROTECTED]> writes: > Is there a way to set locale per query (i use latest JDBC drivers). I am in > situation, where we need to make ORDER BY querys over data that is in > various langages - English, Russian, Estonian, Latvian. I know that there > are issues with indexing tha

Re: [GENERAL] Random not so random

2004-10-05 Thread Dann Corbit
Here is a tarball for MT: http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/mt19937ar.t gz It has a BSD license. What could be better? > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Dann Corbit > Sent: Tuesday, October 05, 2004 9:34 AM

[GENERAL] problem with pg_restore

2004-10-05 Thread Alexander Cohen
I cant seem to get pg_restore to work for me. here's how im calling it: pg_restore -d -C -v -U It keeps on telling me that the database does not exist so it cant connect to it. I thought the -C flag creates the database, what am i missing here? Thanks Alex ---(end of

[GENERAL] Verifying Referential Integrity

2004-10-05 Thread Geisler, Jim
Title: Message So, as far as I know, PostgreSQL does not have any way of verifying the loss of referential integrity.   Are there any recommended methods or utilities for checking referential integrity in a PostgreSQL database?  

Re: [GENERAL] Verifying Referential Integrity

2004-10-05 Thread Alvaro Herrera
On Tue, Oct 05, 2004 at 02:03:09PM -0400, Geisler, Jim wrote: > So, as far as I know, PostgreSQL does not have any way of verifying the loss > of referential integrity. ... just like it doesn't have a way of verifying loss of tables or any other object. If someone messes up the schema (be it via

Re: [GENERAL] Verifying Referential Integrity

2004-10-05 Thread Jimmie H. Apsey
Geisler, Jim wrote: Message So, as far as I know, PostgreSQL does not have any way of verifying the loss of referential integrity.   Are there any recommended methods or utilities for checking referential integrity in a PostgreSQL database?   Of course, Tom Lane suggested I lo

Re: [GENERAL] Verifying Referential Integrity

2004-10-05 Thread Frank Miles
On Tue, 5 Oct 2004, Geisler, Jim wrote: So, as far as I know, PostgreSQL does not have any way of verifying the loss of referential integrity. Are there any recommended methods or utilities for checking referential integrity in a PostgreSQL database? Perhaps someone knows of a more "automatic" solu

Re: [GENERAL] Random not so random

2004-10-05 Thread Vivek Khera
> "DS" == D Stimits <[EMAIL PROTECTED]> writes: DS> If it uses the same seed from the connection, then all randoms within DS> a connect that has not reconnected will use the same seed. Which means DS> the same sequence will be generated each time, which is why it is DS> pseudo-random and not r

Re: [GENERAL] problem with pg_restore

2004-10-05 Thread Tom Lane
Alexander Cohen <[EMAIL PROTECTED]> writes: > pg_restore -d -C -v -U > It keeps on telling me that the database does not exist so it > cant connect to it. I thought the -C flag creates the database, what am > i missing here? It does, but you have to connect somewhere first so you can issue

Re: [GENERAL] Verifying Referential Integrity

2004-10-05 Thread Tom Lane
"Geisler, Jim" <[EMAIL PROTECTED]> writes: > So, as far as I know, PostgreSQL does not have any way of verifying the loss > of referential integrity. What are you trying to accomplish here, and in what PG version? Are you trying to check that PG thinks that a foreign-key relationship is installed

Re: [GENERAL] Random not so random

2004-10-05 Thread D. Stimits
Vivek Khera wrote: "DS" == D Stimits <[EMAIL PROTECTED]> writes: DS> If it uses the same seed from the connection, then all randoms within DS> a connect that has not reconnected will use the same seed. Which means DS> the same sequence will be generated each time, which is why it is DS> pseudo-ran

[GENERAL] lower/upper support and cyrillic

2004-10-05 Thread pginfo
Hi , I tesetd the lower/upper support and cyrillic and it looks broken. My system: pg 7.4.3 freebsd 5.2.1. I created my database with 'UNICODE'. Is it my mistake or realy pg do not support correctly lower and upper ? I readet also the ToDo and do not find this task. reagards, ivan. -

Re: [GENERAL] lower/upper support and cyrillic

2004-10-05 Thread Oleg Bartunov
Ivan, you need 8.0, which is in beta3 stage, to have it working. Oleg On Wed, 6 Oct 2004, pginfo wrote: > Hi , > > I tesetd the lower/upper support and cyrillic and it looks broken. > > My system: > pg 7.4.3 > freebsd 5.2.1. > > I created my database with 'UNICODE'. > > Is it my mistak

Re: [GENERAL] lower/upper support and cyrillic

2004-10-05 Thread Alvaro Herrera
On Wed, Oct 06, 2004 at 08:00:57AM +0200, pginfo wrote: Hi, > I tesetd the lower/upper support and cyrillic and it looks broken. > > My system: > pg 7.4.3 > freebsd 5.2.1. > > I created my database with 'UNICODE'. > > Is it my mistake or realy pg do not support correctly lower and upper ? Th

[GENERAL] Mirroring databases in v8

2004-10-05 Thread Glen Eustace
I thought I had seen something that indicated that v8 was going to provide a means to mirror databases without needing all the triggers etc. I downloaded beta 3 but couldn't see anything that would do this. My goal is to mirror a database from one server to another, hopefully from the logs so that