[GENERAL] date/time function

2005-12-01 Thread Sterpu Victor
I need a function that will transform from the format '2002-09-08 05:29:41' to seconds since 1970. Thank you. ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] date/time function

2005-12-01 Thread A. Kretschmer
am 01.12.2005, um 11:07:59 +0200 mailte Sterpu Victor folgendes: > I need a function that will transform from the format '2002-09-08 05:29:41' > to seconds since 1970. scholl=# select now(); now --- 2005-12-01 10:18:47.554236+01 (1 row) scholl=# select

Re: [GENERAL] date/time function

2005-12-01 Thread Terry Lee Tucker
rnd=# select extract(epoch from timestamp '2002-09-08 05:29:41'); date_part 1031477381 (1 row) See the date/time functions documentation. On Thursday 01 December 2005 04:07 am, Sterpu Victor saith: > I need a function that will transform from the format '2002-09-08 > 05:29:41' to s

Re: [GENERAL] postgres log file

2005-12-01 Thread Richard Huxton
surabhi.ahuja wrote: the postgreslog has permission - 777, so anyone is able to write in it. that s why it is atleast showing LOG: logger shutting down but i want more logging to be done ..how can it be done .. Oh - I thought the message was being echoed to STDERR. You'll still want to

Re: [GENERAL] postgres log file

2005-12-01 Thread surabhi.ahuja
Title: Re: [GENERAL] postgres log file how do i  "Use the syslog daemon to record your logs."   thanks, regards Surabhi From: Richard Huxton [mailto:[EMAIL PROTECTED]Sent: Thu 12/1/2005 3:07 PMTo: surabhi.ahujaCc: pgsql-general@postgresql.orgSubject: Re: [GENERAL] postgres log file ***

Re: [GENERAL] postgres log file

2005-12-01 Thread Richard Huxton
surabhi.ahuja wrote: how do i "Use the syslog daemon to record your logs." See Ch 17.7 of the manuals "Error reporting and logging". You'll want to set your log_destination to syslog and make sure syslog itself is set up to route LOCAL0 (or whatever facility you use if you change it). But

[GENERAL] alter table schema on 8.0.X

2005-12-01 Thread William Leite Araújo
Hi, I'm trying alter a table schema on 'PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.5 (Debian 1:3.3.5-5)'. On 8.1, by documentation, has the commant "ALTER TABLE SET SCHEMA ". Any solution for this in 8.0? Ps.: solutions different of "CREATE TABLE as SE

Re: [GENERAL] Finding uniques across a big join

2005-12-01 Thread John D. Burger
Bruno Wolff III wrote: That changes the semantics of what I want. If I group by personID above, then every FOUR-way combo is of course unique. What I'd like to do is group by the three attributes, and select for personID as well. But of course you can't select for columns you haven't grouped

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-12-01 Thread Andrew Sullivan
On Wed, Nov 30, 2005 at 02:58:15PM -0700, Michael Fuhr wrote: > > Shouldn't that be 8.0 and later? That's when savepoints were > introduced. Or are you referring to something else? Doh. Indeed. I was _thinking_ os something else, but not referring to something else. A -- Andrew Sullivan |

[GENERAL] help with utf8

2005-12-01 Thread Hugo
Hican anybody help with this error, I attatched an imagethanksPosgtrest 8.1.0 on WinXP Pro SP1 error.PNG Description: PNG image ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail co

Re: [GENERAL] help with utf8

2005-12-01 Thread Hugo
don't know if this is the best solution but I dropped the database and recreated it with SQL_ASCII instead of UTF-8 and everything worked as expectedHugoOn 01/12/05, Hugo <[EMAIL PROTECTED]> wrote:Hi can anybody help with this error, I attatched an imagethanksPosgtrest 8.1.0 on WinXP Pro SP1

[GENERAL] fatal error in pg.log

2005-12-01 Thread Medora Schauer
We are using ver 7.3.4 (old I know but we can’t upgrade until early next year) on a linux 2.4 system and are having some flaky problems with our apps.  They just die at apparently random times.  In trying to figure out what is going on I noticed a couple of messages in pg.log that concern m

Re: [GENERAL] How to run a stored PL/pgSQL function?

2005-12-01 Thread Ken Winter
That works. Thanks! (Thanks also to Joshua Drake, who contributed the same answer.) ~ Ken > -Original Message- > From: Michael Glaesemann [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 30, 2005 11:19 PM > To: Ken Winter > Cc: PostgreSQL pg-general List > Subject: Re: How to run

[GENERAL] encoding problem

2005-12-01 Thread marcelo Cortez
folks i have problems with encodings the scenario is: database: CREATE DATABASE "testLatin" WITH OWNER = owner1 ENCODING = 'LATIN9'; test table: CREATE TABLE test ( nombre varchar(20)) WITH OIDS; ALTER TABLE test OWNER TO marcelo; data: nombre - "maricón" "ñañoso pícaro" t

Re: [GENERAL] help with utf8

2005-12-01 Thread Richard Huxton
Hugo wrote: don't know if this is the best solution but I dropped the database and recreated it with SQL_ASCII instead of UTF-8 and everything worked as expected It would SQL_ASCII just accepts whatever it's given. Hugo - a quick tip for future questions, just post the text of the message not

Re: [GENERAL] encoding problem

2005-12-01 Thread Tom Lane
marcelo Cortez <[EMAIL PROTECTED]> writes: > i have problems with encodings You need to make sure that the database locale matches what you want, not only the encoding. See the "Localization" chapter in the docs: http://www.postgresql.org/docs/8.1/static/charset.html reg

Re: [GENERAL] default_index_tablespace?

2005-12-01 Thread Marc Cousin
Yeah, I could use that too :) I think that would be good in order to separate users on different disks easily (if this parameter could be set by user too ...) Le Jeudi 01 Décembre 2005 08:32, Alexander M. Pravking a écrit : > PostgreSQL 8.0 brought a great tablespaces feature. However, it's still

Re: [GENERAL] help with utf8

2005-12-01 Thread Hugo
Richard,I have to import data from a CSV file with the pgsql COPY command, I just know that this file comes from an old program written in Clipper (or something like under linux) , my database was created with UTF8,  I cant find how to create it with UTF-16 on windows, what is the recomended encodi

Re: [GENERAL] fatal error in pg.log

2005-12-01 Thread Tom Lane
"Medora Schauer" <[EMAIL PROTECTED]> writes: > We are using ver 7.3.4 (old I know but we can't upgrade until early next > year) on a linux 2.4 system and are having some flaky problems with our > apps. They just die at apparently random times. In trying to figure > out what is going on I noticed

Re: [GENERAL] fatal error in pg.log

2005-12-01 Thread Medora Schauer
I looked in the log again and sure enough I missed this immediately before the WARNINGS: PANIC: link from /data/database/pg_xlog/000100D9 to /data/database/pg_xlog/000100E1 (initialization of log file 1, segment 225) failed: No such file or directory LOG: server process (pid 574

[GENERAL] 8.1, OID's and plpgsql

2005-12-01 Thread Uwe C. Schroeder
Hi everyone, in 8.1 by default tables have no OID's anymore. Since OID's are 4 byte it's probably a good idea to discourage the use of them (they produced a lot of trouble in the past anyways, particularly with backup/restores etc) Now there's the issue with stored procs. A usual construct wou

Re: [GENERAL] fatal error in pg.log

2005-12-01 Thread Tom Lane
"Medora Schauer" <[EMAIL PROTECTED]> writes: > I looked in the log again and sure enough I missed this immediately > before the WARNINGS: > PANIC: link from /data/database/pg_xlog/000100D9 to > /data/database/pg_xlog/000100E1 (initialization of log file 1, > segment 225) failed: N

Re: [GENERAL] Question

2005-12-01 Thread Brandon E Hofmann
The procedure syntax CREATE PROCEDURE doesn't exist in 8.1. What specific topic are you referring to in your doc link reference? ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

[GENERAL] Switchover : WAL archiving and shutdown...

2005-12-01 Thread Philippe Ferreira
Hi, I'm setting up switchover (to another server) with WAL/PITR. But I'm wondering what is the behaviour of postgresql when you shut it down, while a new WAL archive is just ready to be copied, or if the transfer is in progress ? Is it kept on hold, until the next start, or is it copied before

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-12-01 Thread Tim Bunce
On Wed, Nov 30, 2005 at 04:19:18PM -0500, Andrew Sullivan wrote: > On Tue, Nov 29, 2005 at 07:44:05PM +, Tim Bunce wrote: > > On Tue, Nov 29, 2005 at 10:50:01AM -0800, Tyler MacDonald wrote: > > > PostgreSQL, doing a SELECT on a table that doesn't exist poisons the rest > > > of > > > the tran

[GENERAL] number of dimensions of a multi-dimensional array

2005-12-01 Thread
Hi! I am developing pl/pgsql functions with multi-dimensional array input parameter. I can use array_dims(), but it gives just the text representation of the structure and it is not suitable when I want to iterate over the whole array with the array_lower() and array_upper() functions. I want to h

Re: [GENERAL] encoding problem

2005-12-01 Thread marcelo Cortez
--- Tom Lane <[EMAIL PROTECTED]> escribió: > marcelo Cortez <[EMAIL PROTECTED]> writes: > > i have problems with encodings > > You need to make sure that the database locale > matches what you want, > not only the encoding. > > See the "Localization" chapter in the docs: > http://www.postgres

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-12-01 Thread Jochen Wiedmann
Tim Bunce wrote: No doubt someone will quote the relevant parts. (And no doubt the relevant parts will say "it depends" :) I believe, the "no doubt" part is showing your age, aka experience. :-) ---(end of broadcast)--- TIP 6: explain analyze is

Re: [GENERAL] Finding uniques across a big join

2005-12-01 Thread Marcin Inkielman
John D. Burger napisał(a): > > select v1.pkey1, v1.field2, v1.field3, v1.field4 > from view as v1 > join > (select v2.field1, v2.field2, v2.field3 > from view as v2 > group by v2.field2, v2.field3, v2.field4 > having count(*) = 1) > using (field2, field3, field4); > > This is

[GENERAL] Disk Keeper

2005-12-01 Thread David Saunders
Hi, Has any body got any experience of using Disk Keeper on Windows (On line defragmenter) on the same machine as a PostgreSQL server. We are proposing to use it but do not know if it will have any adverse effects on the overall performance of the Postgres Server. If anybody is already using t

Re: [GENERAL] fatal error in pg.log

2005-12-01 Thread Medora Schauer
> > "Medora Schauer" <[EMAIL PROTECTED]> writes: > > I looked in the log again and sure enough I missed this immediately > > before the WARNINGS: > > > PANIC: link from /data/database/pg_xlog/000100D9 to > > /data/database/pg_xlog/000100E1 (initialization of log file 1, > > segme

[GENERAL] Function returning SETOF

2005-12-01 Thread Terry Lee Tucker
List, I have a simple function: CREATE OR REPLACE FUNCTION parse_string (TEXT, TEXT) RETURNS SETOF TEXT AS ' DECLARE str ALIAS FOR $1; -- the string to parse delimiter ALIAS FOR $2; -- the delimiter field TEXT; -- return

Re: [GENERAL] Function returning SETOF

2005-12-01 Thread Terry Lee Tucker
I knew I was doing something stupid. Right after I sent this I realized I was calling incorrectly. This works: rnd=# select * from parse_string ('1/2/3/4/5', '/'); NOTICE: parse_string () parse_string -- 1 2 3 4 5 (5 rows) And so does this: rnd=# select ARRAY(SELECT * from pars

[GENERAL] interval behaviour

2005-12-01 Thread Scott Marlowe
I seem to have found a rather odd interval bug. Reading through the sql2003 spec, it would appear that the "proper" way to represent an interval would be: interval '10' day (see pp 144-5, section 5.3 of ISO/IEC 9075-2:2003(E)) Excerpt: ::= INTERVAL [ ] ::= Note that the qualifier is p

Re: [GENERAL] default_index_tablespace?

2005-12-01 Thread Kelly Burkhart
On 12/1/05, Alexander M. Pravking <[EMAIL PROTECTED]> wrote: PostgreSQL 8.0 brought a great tablespaces feature. However, it's stilla real pain for one who wants to separate tables and indices to differenttablespaces: he has to do it manually, explicitely specifying tablespace for each index.Thus,

Re: [GENERAL] help with utf8

2005-12-01 Thread Richard Huxton
Hugo wrote: Richard, I have to import data from a CSV file with the pgsql COPY command, I just know that this file comes from an old program written in Clipper (or something like under linux) , my database was created with UTF8, I cant find how to create it with UTF-16 on windows, what is the r

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-12-01 Thread Greg Stark
Jaime Casanova <[EMAIL PROTECTED]> writes: > that is a mis-conception... a transaction *must* be atomic (all or nothing)... > the reason some databases act that bad is because they don't support > savepoints, and because postgres does it doesn't need that > awfulness... Well it's not as bad as a

[GENERAL] Switchover : WAL archiving and shutdown...

2005-12-01 Thread Philippe Ferreira
Hi, I'm setting up switchover (to another server) with WAL/PITR. But, I'm wondering what could be the behaviour of Postgresql if you shutdown the service while a new WAL archive is just ready to be copied, or if the transfer is in progress... Will the tranfer be canceled (until the next start

Re: [GENERAL] Finding uniques across a big join

2005-12-01 Thread Greg Stark
"John D. Burger" <[EMAIL PROTECTED]> writes: > I don't know what that does. If you mean: > > select max(p2.personID), p2.eyeColor, p2.hairColor, p2.skinColor >from persons as p2 >group by p2.personID, p2.eyeColor, p2.hairColor, p2.skinColor >having count(*) = 1; > > then I don't thi

Re: [GENERAL] interval behaviour

2005-12-01 Thread Tom Lane
Scott Marlowe <[EMAIL PROTECTED]> writes: > Reading through the sql2003 spec, it would appear that the "proper" way > to represent an interval would be: > interval '10' day This is not actually implemented. The bizarre special-purpose syntax the spec requires for datetime literals was something

Re: [GENERAL] Disk Keeper

2005-12-01 Thread Jaime Casanova
On 12/1/05, David Saunders <[EMAIL PROTECTED]> wrote: > Hi, > > Has any body got any experience of using Disk Keeper on Windows (On line > defragmenter) on the same machine as a PostgreSQL server. We are proposing > to use it but do not know if it will have any adverse effects on the overall > perf

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-12-01 Thread Joshua D. Drake
Where is Postgres at with psql using savepoints implicitly to wrap every client command btw? My single biggest pet peeve with Postgres is that setting autocommit off in psql is basically unusable because any typo forces you to start your transaction all over again. Going to have to disagree w

Re: [GENERAL] Question

2005-12-01 Thread Jaime Casanova
On 11/30/05, Brandon E Hofmann <[EMAIL PROTECTED]> wrote: > The procedure syntax CREATE PROCEDURE doesn't exist in 8.1. What specific > topic are you referring to in your doc link reference? > > even while we haven't CREATE PROCEDURE yet we can define a function and return VOID you can find some

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-12-01 Thread Michael Fuhr
On Thu, Dec 01, 2005 at 01:04:52PM -0500, Greg Stark wrote: > Where is Postgres at with psql using savepoints implicitly to wrap every > client command btw? My single biggest pet peeve with Postgres is that setting > autocommit off in psql is basically unusable because any typo forces you to > star

Re: [GENERAL] 8.1, OID's and plpgsql

2005-12-01 Thread Richard Huxton
Uwe C. Schroeder wrote: Hi everyone, in 8.1 by default tables have no OID's anymore. Since OID's are 4 byte it's probably a good idea to discourage the use of them (they produced a lot of trouble in the past anyways, particularly with backup/restores etc) Now there's the issue with stored pr

Re: [GENERAL] 8.1, OID's and plpgsql

2005-12-01 Thread Jaime Casanova
On 12/1/05, Uwe C. Schroeder <[EMAIL PROTECTED]> wrote: > > Hi everyone, > > in 8.1 by default tables have no OID's anymore. Since OID's are 4 byte it's > probably a good idea to discourage the use of them (they produced a lot of > trouble in the past anyways, particularly with backup/restores etc)

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-12-01 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > Where is Postgres at with psql using savepoints implicitly to wrap every > client command btw? I think that 8.1 psql can be told to do that. regards, tom lane ---(end of broadcast)---

[GENERAL] information_schema._pg_keypositions() in 8.1???

2005-12-01 Thread Jason Long
I cannot get automatic schema update to work in 8.1 with hibernate 3.0.5.  I get the following error every time.   java.sql.SQLException: ERROR: function information_schema._pg_keypositions() does not exist   Is this something I should be looking to fix with Hibernate or PostgreSQL?  

Re: [GENERAL] information_schema._pg_keypositions() in 8.1???

2005-12-01 Thread Jason Long
Executing the following from “information_schema.sql” from the 8.0 distribution against the restored database in 8.1 solved the problem.  Is this a bug?   * SET search_path TO information_schema, public;   /*  * A few sup

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-12-01 Thread Bruce Momjian
Tom Lane wrote: > Greg Stark <[EMAIL PROTECTED]> writes: > > Where is Postgres at with psql using savepoints implicitly to wrap every > > client command btw? > > I think that 8.1 psql can be told to do that. Right: \set ON_ERROR_ROLLBACK interactive -- Bruce Momjian

Re: [GENERAL] information_schema._pg_keypositions() in 8.1???

2005-12-01 Thread Tom Lane
"Jason Long" <[EMAIL PROTECTED]> writes: > I cannot get automatic schema update to work in 8.1 with hibernate 3.0.5. I > get the following error every time. > java.sql.SQLException: ERROR: function information_schema._pg_keypositions() > does not exist Hm, it looks like some bright soul at Hiber

Re: [GENERAL] interval behaviour

2005-12-01 Thread Scott Marlowe
On Thu, 2005-12-01 at 12:08, Tom Lane wrote: > Scott Marlowe <[EMAIL PROTECTED]> writes: > > Reading through the sql2003 spec, it would appear that the "proper" way > > to represent an interval would be: > > > interval '10' day > > This is not actually implemented. The bizarre special-purpose sy

Re: [GENERAL] interval behaviour

2005-12-01 Thread Tom Lane
Scott Marlowe <[EMAIL PROTECTED]> writes: > Actually, I too prefer PostgreSQL's syntax. It's the worrisome > behaviour of swallowing the spec syntax but not giving the right answer > that scares me. Would it be very hard to have it just return an error > in that case? Rather an error than the wr

Re: [GENERAL] Disk Keeper

2005-12-01 Thread Johan
If you feel the need to defragment your database files you need to set them up differently. Using partitions on your hard disks and smart use of tablespaces you can create a setup that needs no defragmenting. Besides, on larger disks defragmentation isn't even necessary.On 12/1/05, David Saunders

Re: [GENERAL] Function returning SETOF

2005-12-01 Thread Tony Caduto
Terry Lee Tucker wrote: List, I have a simple function: CREATE OR REPLACE FUNCTION parse_string (TEXT, TEXT) RETURNS SETOF TEXT AS ' DECLARE str ALIAS FOR $1; -- the string to parse delimiter ALIAS FOR $2; -- the delimiter field TEXT;

Re: [GENERAL] Finding uniques across a big join

2005-12-01 Thread John D. Burger
Greg Stark wrote: select max(personid) as personid, eyecolor, haircolor, skincolor from persons group by eyecolor, haircolor, skincolor having count(*) = 1 Aha, I understand Bruno's suggestion now! I was actually trying to think of some way of using an aggregate on personid, but couldn't

Re: [GENERAL] Switchover : WAL archiving and shutdown...

2005-12-01 Thread Stephen Frost
* Philippe Ferreira ([EMAIL PROTECTED]) wrote: > But, I'm wondering what could be the behaviour of Postgresql if you > shutdown the > service while a new WAL archive is just ready to be copied, or if the > transfer is in > progress... > Will the tranfer be canceled (until the next start), or will

Re: [GENERAL] information_schema._pg_keypositions() in 8.1???

2005-12-01 Thread Kris Jurka
On Thu, 1 Dec 2005, Jason Long wrote: I cannot get automatic schema update to work in 8.1 with hibernate 3.0.5. I get the following error every time. java.sql.SQLException: ERROR: function information_schema._pg_keypositions() does not exist This is actually a sign that you are using an 8

Re: [GENERAL] fatal error in pg.log

2005-12-01 Thread Martijn van Oosterhout
On Thu, Dec 01, 2005 at 11:18:14AM -0600, Medora Schauer wrote: > I found this in /var/log/messages: > > Dec 1 09:23:40 Qc kernel: __alloc_pages: 0-order allocation failed > (gfp=0x1d2/0) > Dec 1 09:23:40 Qc kernel: VM: killing process postmaster > > Is this because we are running out of memory

Re: [GENERAL] 8.1, OID's and plpgsql

2005-12-01 Thread Martijn van Oosterhout
On Thu, Dec 01, 2005 at 09:01:05AM -0800, Uwe C. Schroeder wrote: > Now there's the issue with stored procs. A usual construct would be to > ... > ... > INSERT xx; > GET DIAGNOSTICS lastoid=RESULT_OID; > SELECT oid=lastoid; > > > > Is there anything one could sanely replace this

[GENERAL] Encoding problem

2005-12-01 Thread marcelo Cortez
hi Tom , folks how do i " You need to make sure that the database locale > matches what you want," ? any pointer by appreciated sorry for silly questions ;) best ___ 1GB gratis, Antivirus y Ant

[GENERAL] pg_restore error

2005-12-01 Thread Scott Frankel
What does this error mean? pg_restore: [tar archiver] could not find header for file 1765.dat in tar archive All of a sudden, I'm encountering this error as I debug a problem with the db interface I'm using. My backups are created using a script that hasn't changed recently, though I

[GENERAL] postmaster / resolv.conf / dns problem

2005-12-01 Thread Cott Lang
I'm running 7.4.8 on RHEL 3.0 x86. Today, on two separate servers, I modified the resolv.conf file to point from two functioning name servers to two others. Within 5 minutes, one server would not accept new remote connections. I could log in fine w/ psql locally. All name servers involved were

[GENERAL] Slow COUNT

2005-12-01 Thread Poul Møller Hansen
I can see it has been discussed before, why COUNT(*) tends to be slow on PostgreSQL compared with ex. MySQL. As far as I understood it has something to do with missing numbering on the rows in the indexes and that there should be plenty of reasons not to implement that in PostgreSQL, not that I

Re: [GENERAL] pg_restore error

2005-12-01 Thread Tom Lane
Scott Frankel <[EMAIL PROTECTED]> writes: > What does this error mean? > pg_restore: [tar archiver] could not find header for file 1765.dat > in tar archive It means either the tar file is corrupt or pg_restore has a bug. Can tar read the file correctly? If so, does it find a file named

[GENERAL] lo_import permissions problem

2005-12-01 Thread [EMAIL PROTECTED]
I have been trying to import a file into a table using lo_import and keep getting the error ERROR: could not open server file "/tmp/myfile": Permission denied The file is in /tmp so it is world readable and I made sure the file had the correct permissions by doing chmod 777. My user has super use

Re: [GENERAL] 8.1, OID's and plpgsql

2005-12-01 Thread Uwe C. Schroeder
On Thursday 01 December 2005 10:24, Jaime Casanova wrote: > On 12/1/05, Uwe C. Schroeder <[EMAIL PROTECTED]> wrote: > > Hi everyone, > > > > in 8.1 by default tables have no OID's anymore. Since OID's are 4 byte > > it's probably a good idea to discourage the use of them (they produced a > > lot of

Re: [GENERAL] postmaster / resolv.conf / dns problem

2005-12-01 Thread Tom Lane
Cott Lang <[EMAIL PROTECTED]> writes: > I'm running 7.4.8 on RHEL 3.0 x86. > Today, on two separate servers, I modified the resolv.conf file to point > from two functioning name servers to two others. > Within 5 minutes, one server would not accept new remote connections. I > could log in fine w/

Re: [GENERAL] Slow COUNT

2005-12-01 Thread Rodrigo Gonzalez
Poul, 2 thingsfirst, why do you think it will have an impact on inserts? And the second oneuse InnoDb tables in MySQL, and you will have the same than with PostgreSQL, it's because of MVCC Best regards Rodrigo Poul Møller Hansen wrote: I can see it has been discussed before, why CO

Re: [GENERAL] Function returning SETOF

2005-12-01 Thread David Fetter
On Thu, Dec 01, 2005 at 12:32:02PM -0500, Terry Lee Tucker wrote: > List, > > I have a simple function: I have a simpler one :) CREATE OR REPLACE FUNCTION split_to_rows(TEXT, TEXT) /* Descriptive name */ RETURNS SETOF TEXT STRICT LANGUAGE sql AS $$ SELECT (string_to_array($1, $2))[s.i] F

Re: [GENERAL] number of dimensions of a multi-dimensional array

2005-12-01 Thread David Fetter
On Thu, Dec 01, 2005 at 02:15:39PM +0100, &ru wrote: > Hi! > > I am developing pl/pgsql functions with multi-dimensional array input > parameter. > I can use array_dims(), but it gives just the text representation of > the structure and it is not suitable when I want to iterate over the > whole ar

Re: [GENERAL] pg_restore error

2005-12-01 Thread Scott Frankel
Yes, the tar file contains a file called 1765.dat. A `cat` of that file shows nothing more than an empty line (i.e.: a carriage return). -rw--- 1 frankel prod1 Nov 29 11:20 1765.dat Extracting the archive, tar reported a "lone zero block." I don't know what this re

Re: [GENERAL] pg_restore error

2005-12-01 Thread Tom Lane
Scott Frankel <[EMAIL PROTECTED]> writes: > Yes, the tar file contains a file called 1765.dat. A `cat` of that > file shows nothing more than an empty line (i.e.: a carriage return). > -rw--- 1 frankel prod1 Nov 29 11:20 1765.dat > Extracting the archive, tar reported a "l

Re: [GENERAL] lo_import permissions problem

2005-12-01 Thread Tom Lane
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > I have been trying to import a file into a table using lo_import and keep > getting the error > ERROR: could not open server file "/tmp/myfile": Permission denied > The file is in /tmp so it is world readable and I made sure the file had the > cor

[GENERAL] PostgresSQL Halting System Boot

2005-12-01 Thread Matias Silva
Hi everyone, I'm totally new here and I got a little issue. I just got done installing PostgreSQL 8.1. I have configured PostgreSQL to start automatically upon system start via an init script. Problem is that when CentOS boots it halts on "Starting PostgeSQL". I have to press the key to resume

[GENERAL] Fast FrontBase to PostgreSQL converter?

2005-12-01 Thread Brendan Duddridge
Hello,Does anyone know a fast way to convert a FrontBase 4.1.16 database to a PostgreSQL 8.1 database? I have a java program that does it, but I was hoping there would be something faster. Last time I converted a database with it, it took quite a few hours. I have a production system that I need to

Re: [GENERAL] Slow COUNT

2005-12-01 Thread Greg Stark
Poul Møller Hansen <[EMAIL PROTECTED]> writes: > My questions is, which statements can use to count the rows faster ? > 32 secs compared to 10 ms ! Try starting a transaction in one window updating one of those records and see how long it takes your count(*) to complete in the other window while

Re: [GENERAL] lo_import permissions problem

2005-12-01 Thread [EMAIL PROTECTED]
Tom, Yep I have double checked my permissions on /tmp. You may be right with your suggestion about SELinux. I was actually testing this on two boxes and one is a Fedora box which I believe runs SELinux. I have gotten things to work on the Gentoo box now. It would not work when I was logged in as r

Re: [GENERAL] postmaster / resolv.conf / dns problem

2005-12-01 Thread Cott Lang
> Within 5 minutes, one server would not accept new remote connections. I > could log in fine w/ psql locally. This is pretty bizarre ... offhand I would not have thought that the postmaster depended on DNS service at all. Were you maybe using DNS names instead of IP addresses in pg_hba.co