[ADMIN] self defined counter function

2004-04-20 Thread Enrico Ortmann
Hi admins, I got a conceptual question on creating a stored procedure I need for my app. First the description of the problem: I need a counter which works with 36 possible values per character [0-9 and thereafter A-Z]. That means if incremented it should return values as follows: 00

[ADMIN] Data replication

2004-04-20 Thread GP
Hi all, I am quite new in Postgresql and I am wondering if it supports data replication. If I understand correctly postgresql has only the "pg_dumpall" function that makes a copy/backup of the database, and it does not support a functionality for automatic data replcation in a backup database ?

Re: [ADMIN] Data replication

2004-04-20 Thread Andrew Sullivan
On Tue, Apr 20, 2004 at 11:08:12AM +0300, GP wrote: > Hi all, > > I am quite new in Postgresql and I am wondering if it supports data > replication. Yes. There are several projects supporting it, some in contrib/ and some on the gborg.postgresql.org site. My employer, Afilias uses erserver tod

Re: [ADMIN] self defined counter function

2004-04-20 Thread Paul Breen
Hello Enrico, You could try this. create table codes (code_urn integer, code char(1)); create sequence code_urn_seq minvalue 0 maxvalue 35 cycle; insert into codes values(0,'0'); ... insert into codes values(35,'Z'); Then the following query would give you the incrementing code purely

Re: [ADMIN] self defined counter function

2004-04-20 Thread Enrico Ortmann
Hi Paul, PB> select code from codes where code_urn = (select nextval('code_urn_seq')); Yes this is a great idea, but it only manages one character. But I need a counter with at least a variable length and it has to be filled with leading zero-values, so that the length of the generated counter

Re: [ADMIN] Going from a DB using SQL_ASCII to UNICODE

2004-04-20 Thread CoL
hi, Dion Almaer wrote, On 4/19/2004 21:44: - ERROR: invalid byte sequence for encoding "UNICODE": 0xe9616c and for this: convert your dump with iconv to unicode, then load it. C. ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, p

Re: [ADMIN] Going from a DB using SQL_ASCII to UNICODE

2004-04-20 Thread CoL
hi, Dion Almaer wrote, On 4/19/2004 21:44: - ERROR: missing data for column "noiselevel" - CONTEXT: COPY messages, line 1: "4393 -1 144114147 0 2000-10-12 18:30:58-05 EJB Design Questions\N Hi," for this one: better to dump with: -d C. ---(end of b

[ADMIN] Using Cursor in PGSql ver 7.3

2004-04-20 Thread Ashvinder Singh
Hi All, I want to use a Cursor in PGSql function. It should have all the functionalities like MoveNext, Fetch and MoveBackward etc. Using PGSql Help provided,I have created a function using a Cursor but it is not working and gives errors. I am using PostGres ver 7.3. The code of the function

[ADMIN] unsubscribe

2004-04-20 Thread Raquel Vieira
Please unsubscribe me from this list. ---(end of broadcast)--- TIP 8: explain analyze is your friend

[ADMIN] Unfamiliar recovery message afer server crash

2004-04-20 Thread Arthur Ward
For unknown reasons, our PG server died overnight. (PG 7.4.2, RedHat 8, ext3 ordered data mode, and battery backed RAID5) When it came back up, I saw an unfamiliar line in the recovery output from Postgres: Apr 20 11:28:14 postgres: [6203] LOG: database system was interrupted at 2004-04-20 05:50

[ADMIN] Problems doing a restore under 7.4.2

2004-04-20 Thread Chris White (cjwhite)
I have just migrated from 7.2.1 to 7.4.2 and I have the following tables defined in my database. /* */ /* Table: vm_config */ /* */ create table vm_config ( Parameter varchar(

[ADMIN] unsubscribe

2004-04-20 Thread AlmawElias Fantahun
Please unsubscribe me from this list. ---(end of broadcast)--- TIP 8: explain analyze is your friend _ Watch LIVE baseball games on your computer with MLB.TV, included with MSN Premiu

Re: [ADMIN] self defined counter function

2004-04-20 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 (1679616 is 36^4, 36 is 0-9+A-Z) CREATE SEQUENCE abase MINVALUE 0 MAXVALUE 1679616 CYCLE; CREATE OR REPLACE FUNCTION fillbase(BIGINT,INT,INT) RETURNS VARCHAR AS ' DECLARE mynumINTEGER; mybase ALIAS FOR $2; myplaces SMALLINT; first

Re: [ADMIN] Unfamiliar recovery message afer server crash

2004-04-20 Thread Tom Lane
"Arthur Ward" <[EMAIL PROTECTED]> writes: > Apr 20 11:28:14 postgres: [6203] LOG: database system was not properly > shut down; automatic recovery in progress > Apr 20 11:28:14 postgres: [6203] LOG: redo starts at 7C/CF55FBAC > Apr 20 11:28:17 postgres: [6203] LOG: unexpected pageaddr 7C/C7A0A00