[SQL] Bad (null) varchar() external representation

2001-01-09 Thread Justin Clift

Hi all,

I'm getting the following problem when trying to do a simple insert
statement...

"Bad (null) varchar() external representation"

WHY?

I'm running PostgreSQL 7.03 on Linux Mandrake 7.2 (using a specially
compiled version, not an RPM).

Here's the table :

foobar=# \d staff_details
  Table "staff_details"
   Attribute| Type | Modifier
+--+--
 userid | varchar(24)  | not null
 password   | char(13) |
 name   | varchar(96)  |
 role   | smallint |
 dob| date |
 phone_one  | varchar(14)  |
 phone_two  | varchar(14)  |
 phone_three| varchar(14)  |
 address| varchar(280) |
 status | smallint |
 managers_notes | varchar(600) |
Index: staff_details_pkey
Constraints: (length(userid) < 25)
 (length("password") < 14)
 (length(name) < 97)
 (length(phone_one) < 17)
 (length(phone_two) < 17)
 (length(phone_three) < 17)
 (length(address) < 281)
 (length(managers_notes) < 601)

foobar=# insert into staff_details values ('A', NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL);
ERROR:  Bad (null) varchar() external representation
foobar=# insert into staff_details (userid, password, name, role, dob,
phone_one) values ('', 'foobarbaz1234', 'Joshua', 1,
'1970-07-01', '(03) 9867 5432');
ERROR:  Bad (null) varchar() external representation
foobar=# insert into staff_details values ('',
encrypt('foo'), 'Joshua', 1, '1970-07-01', '(03) 9867 5432', '(041) 309
2819', NULL, '1 Blankety-Blank Way\nBazzville', NULL, NULL);
ERROR:  Bad (null) varchar() external representation


etc...

I've tried everything I can think of, also exported and reloaded the
database, etc.  This is a new table with nothing in it.

This is driving me nuts.  :-(

+ Justin Clift
Database Administrator



[SQL] Possible bug? WAS :Bad (null) varchar() external representation.

2001-01-09 Thread Justin Clift

Hi,

I haven't seen a mention of a maximum number of constraints of similar
applying to a table.  If so, then could someone please point me to it...

The reason I mention this is because I've found what seems to be causing
this problem I'm experiencing with Postgres 7.03 :

CREATE TABLE "staff_details" (
"userid" character varying(24) NOT NULL,
"password" character(13) NOT NULL,
"name" character varying(96) NOT NULL,
"role" int2 NOT NULL,
"dob" date NOT NULL,
"phone_one" character varying(14) NOT NULL,
"phone_two" character varying(14),
"phone_three" character varying(14),
"address" character varying(280),
"status" int2,
"managers_notes" character varying(600),
CONSTRAINT "staff_details_uesrid" CHECK ((length(userid) < 25)),
CONSTRAINT "staff_details_password" CHECK ((length("password") <
14)),
CONSTRAINT "staff_details_name" CHECK ((length(name) < 97)),
CONSTRAINT "staff_details_dob" CHECK
(date_ge(date(("timestamp"('2001-01-08'::date) - '18 years
00:00'::"interval")), dob)),
CONSTRAINT "staff_details_phone_one" CHECK ((length(phone_one) <
17)),
CONSTRAINT "staff_details_phone_two" CHECK ((length(phone_two) <
17)),
CONSTRAINT "staff_details_phone_three" CHECK
((length(phone_three) < 17)),
CONSTRAINT "staff_details_address" CHECK ((length(address) <
281)),
CONSTRAINT "staff_details_managers_notes" CHECK
((length(managers_notes) < 601)),
PRIMARY KEY ("userid")
);

When I attempt to insert data into this table, I get the following error
:

foobar=# insert into staff_details values ('',
encrypt('foo'), 'Joshua', 1, '1970-07-01', '(03) 9867 5432', '(041) 309
2819', NULL, '1 Blankety-Blank Way\nBazzville', NULL, NULL);

Yet if I remove BOTH the "staff_details_phone_three" &
"staff_details_managers_notes" constraints it works  :

foobar=# insert into staff_details values ('',
encrypt('foo'), 'Joshua', 1, '1970-07-01', '(03) 9867 5432', '(041) 309
2819', NULL, '1 Blankety-Blank Way\nBazzville', NULL, NULL);
INSERT 27605472 1 

Removing EITHER of these constraints doesn't work, and neither does
removing any of the other constraints on this table.  Just these two
TOGETHER.  AND they're not even defined one-after-another possibly
indicating some formatting error.

Does anyone have an idea why this is occuring?

Regards and best wishes,

+ Justin Clift
Database Administrator


Justin Clift wrote:
> 
> Hi all,
> 
> I'm getting the following problem when trying to do a simple insert
> statement...
> 
> "Bad (null) varchar() external representation"
> 
> WHY?
> 
> I'm running PostgreSQL 7.03 on Linux Mandrake 7.2 (using a specially
> compiled version, not an RPM).
> 
> Here's the table :
> 
> foobar=# \d staff_details
>   Table "staff_details"
>Attribute| Type | Modifier
> +--+--
>  userid | varchar(24)  | not null
>  password   | char(13) |
>  name   | varchar(96)  |
>  role   | smallint |
>  dob| date |
>  phone_one  | varchar(14)  |
>  phone_two  | varchar(14)  |
>  phone_three| varchar(14)  |
>  address| varchar(280) |
>  status | smallint |
>  managers_notes | varchar(600) |
> Index: staff_details_pkey
> Constraints: (length(userid) < 25)
>  (length("password") < 14)
>  (length(name) < 97)
>  (length(phone_one) < 17)
>  (length(phone_two) < 17)
>  (length(phone_three) < 17)
>  (length(address) < 281)
>  (length(managers_notes) < 601)
> 
> foobar=# insert into staff_details values ('A', NULL, NULL, NULL, NULL,
> NULL, NULL, NULL, NULL, NULL, NULL);
> ERROR:  Bad (null) varchar() external representation
> foobar=# insert into staff_details (userid, password, name, role, dob,
> phone_one) values ('', 'foobarbaz1234', 'Joshua', 1,
> '1970-07-01', '(03) 9867 5432');
> ERROR:  Bad (null) varchar() external representation
> foobar=# insert into staff_details values ('',
> encrypt('foo'), 'Joshua', 1, '1970-07-01', '(03) 9867 5432', '(041) 309
> 2819', NULL, '1 Blankety-Blank Way\nBazzville', NULL, NULL);
> ERROR:  Bad (null) varchar() external representation
> 
> etc...
> 
> I've tried everything I can think of, also exported and reloaded the
> database, etc.  This is a new table with nothing in it.
> 
> This is driving me nuts.  :-(
> 
> + Justin Clift
> Database Administrator



Re: [SQL] Possible bug? WAS :Bad (null) varchar() external representation.

2001-01-11 Thread Justin Clift

Hi Tom,

I think you are right.  It does seem to barf on NULLS and
length(varchar), regardless.

Thanks for your assistance.

BTW - How do things normally get added to the FAQ?  I would like to add
something about length(varchar) and NULLS not working in PostgreSQL
7.0.x

Regards and best wishes,

Justin Clift
Database Administrator

Tom Lane wrote:
> 
> Justin Clift <[EMAIL PROTECTED]> writes:
> > I haven't seen a mention of a maximum number of constraints of similar
> > applying to a table.  If so, then could someone please point me to it...
> 
> There is no such limit that I know of.
> 
> > Yet if I remove BOTH the "staff_details_phone_three" &
> > "staff_details_managers_notes" constraints it works  :
> 
> Are you absolutely certain that that's how it went?  I think the most
> likely story is just that you were hitting the length(varchar)-barfs-
> on-NULL bug, and got confused about which combinations you'd tried.
> 
> regards, tom lane



Re: [SQL] Possible bug? WAS :Bad (null) varchar() external representation.

2001-01-11 Thread Justin Clift

Hi Tom and Stephan,

Thanks for your help guys.

I'm using varchar constraint definitions now that are "CHECK ((foobar
ISNULL) OR (length(foobar) < 17))"  The short-circuiting of OR's in
7.0.3 allow this to work without error, thereby avoiding the "Bad (null)
varchar() external representation" error that I was getting before due
to inserting NULL's in length(varchar) constraint checked fields.

I've also extended the varchar columns to be the same size as the length
checking I'm doing as Tom suggested, to ensure the constraints do work.

Tom has also suggested using COALESCE instead, so I'll check this out
too.

Regards and best wishes,

Justin Clift
Database Administrator


Tom Lane wrote:
> 
> > The reason I'm using constraints in the table is to allow the database
> > to recognise when oversize data is being fed to it and generate an
> > error, instead of silently accepting the data and truncating it.
> 
> OK, but have you actually stopped to check whether the combination gives
> the results you expect?  I believe the data will be coerced to the
> destination column type --- including any implicit truncation or padding
> --- before the constraint expressions are checked.  (I further believe
> that that's the right order of events.)
> 
> You might need to make the declared column widths one larger than what
> the constraints check for, if you want to raise an error for this.
> 
> > I'm just about to try the same constraints with the ISNULL first, incase
> > the OR's in postgreSQL are short-circuited like you mention they might
> > be.
> 
> I'd suggest
> 
> CHECK (length(COALESCE(column,'')) < n)
> 
> as a workaround for 7.0.*, if you don't want to hack up the source
> code as I mentioned.
> 
> regards, tom lane



[SQL] Re: HELP: Scarey pl/pgsql problem

2001-01-31 Thread Justin Clift

Hi all,

I must apologise as it turns out the 'culprit' wasn't really pl/pgsql.

The test box I was testing on is Mandrake Linux 7.2, which comes with
PostgreSQL 7.0.2.  Everything else has version 7.0.3 installed on it,
and I naively assumed that 7.0.3 was installed on the test box.

After installing the Postgres 7.0.3 rpms from the PostgreSQL site,
pl/pgsql is working consistently again.  It looks like the rpms for
PostgreSQL supplied with Mandrake Linux 7.2 are broken, I guess they
didn't run the supplied tests before packaging.  :-(

Regards and best wishes,

Justin Clift
Database Administrator


Justin Clift wrote:
> 
> Hi all,
> 
> I'm having trouble with what MAY BE a bug in PL/PGSQL for PG 7.0.3 on
> Linux (Mandrake Linux 7.2).
> 
> It appears pl/pgsql is munging values.  When I pass it a 'time' value,
> the value is altered without my code touching it.  This is evidenced by
> the stripped down function below :
> 
> CREATE FUNCTION which_block(time)
> RETURNS time
> AS 'DECLARE
> 
> /* Given a time, this function works out the name of the correct field
> in the reservations table for it
>  * Written by : Justin Clift
>  * Date   : 1st February 2001
>  * Version: 1.00
>  */
> hours   char(3);
> minutes char(2);
> result  char(5);
> tempres char(5);
> curnow  datetime;
> 
> BEGIN
> 
> RETURN $1;
> END;'
> LANGUAGE 'plpgsql';
> 
> foobar=# select which_block(time '12:40:00');
>  which_block
> -
>  12:39:00
> (1 row)
> 
> foobar=#
> 
> Having passed it the time value of '12:40:00', I am immediately
> returning that value and it is no longer '12:40:00'.
> 
> Being over 1 month into using PostgreSQL 7.0.3 for a particular project,
> this is scaring me as I'm now doubting the reliability of things.
> 
> Regards and best wishes,
> 
> Justin Clift
> Database Administrator



[SQL] HELP: Scarey pl/pgsql problem

2001-02-05 Thread Justin Clift

Hi all,

I'm having trouble with what MAY BE a bug in PL/PGSQL for PG 7.0.3 on
Linux (Mandrake Linux 7.2).

It appears pl/pgsql is munging values.  When I pass it a 'time' value,
the value is altered without my code touching it.  This is evidenced by
the stripped down function below :

CREATE FUNCTION which_block(time)
RETURNS time
AS 'DECLARE

/* Given a time, this function works out the name of the correct field
in the reservations table for it
 * Written by : Justin Clift
 * Date   : 1st February 2001
 * Version: 1.00
 */
hours   char(3);
minutes char(2);
result  char(5);
tempres char(5);
curnow  datetime;

BEGIN

RETURN $1;
END;'
LANGUAGE 'plpgsql';


foobar=# select which_block(time '12:40:00');
 which_block
-
 12:39:00
(1 row)
 
foobar=# 

Having passed it the time value of '12:40:00', I am immediately
returning that value and it is no longer '12:40:00'.

Being over 1 month into using PostgreSQL 7.0.3 for a particular project,
this is scaring me as I'm now doubting the reliability of things.

Regards and best wishes,

Justin Clift
Database Administrator



[SQL] Re: Help needed -> ERROR: record arow has no field description

2001-02-28 Thread Justin Clift

Hi all,

Solved my own problem.  I was just misreading the error message.  It was
actually TELLING me the problem (I was referencing a table with no field
called "description" in the select, but trying to use it in the loop.

Sorry for disturbing people.

As an aside, this has motivated me to add a section on error messages
into techdocs.postgresql.org (very messy at the moment, I'll fix it
tonight).

Regards and best wishes,

+ Justin Clift
Database Administrator

Justin Clift wrote:
> 
> Hi all,
> 
> I'm getting this error, which to me makes no sense.  Running PostgreSQL
> 7.0.3 on Mandrake 7.2 (compiled from source, not the rpms).
> 
> The code is in a pl/pgsql function I am writing and I can't see why it's
> complaining.
> 
> This is the appropriate part of the code :
> 
> 
> 
> arowrecord;
> 
> 
> 
> BEGIN
> 
> 
> 
> FOR arow IN select transaction_payments.cashback from
> transaction_payments, payment_types where
>  transaction_payments.payment_type = payment_types.idnum LOOP
> textbuf := text(arow.cashback);
> textbuf := textcat(textbuf, ''  '');
> insert into receipts (receipt_num, data) values (trans_num,
> textbuf);
> END LOOP;
> 
> 
> 
> >From the PostgreSQL log file (debug is set to 2), I am getting :
> 
> query: SELECT  transaction_payments.cashback from transaction_payments,
> payment_types where transaction_payments.payment_type =
> payment_types.idnum
> ERROR:  record arow has no field description
> DEBUG:  Last error occured while executing PL/pgSQL function
> create_receiptp3
> DEBUG:  line 105 at assignment
> AbortCurrentTransaction
> 
> The "arow" record type variable is used quite a lot in previous FOR
> loops in this function.  This is the first FOR loop in the function that
> uses more than one table though.  I suspect this may have something to
> do with it.
> 
> As far as I can tell, this SQL statement is valid.  Does anyone have any
> ideas how to get this to work.  I have tried several variations, and the
> mailing lists don't even have a reference for this error message.
> 
> Regards and best wishes,
> 
> Justin Clift
> Database Administrator



[SQL] Help needed -> ERROR: record arow has no field description

2001-03-02 Thread Justin Clift

Hi all,

I'm getting this error, which to me makes no sense.  Running PostgreSQL
7.0.3 on Mandrake 7.2 (compiled from source, not the rpms).

The code is in a pl/pgsql function I am writing and I can't see why it's
complaining.

This is the appropriate part of the code :



arowrecord;



BEGIN



FOR arow IN select transaction_payments.cashback from
transaction_payments, payment_types where
 transaction_payments.payment_type = payment_types.idnum LOOP
textbuf := text(arow.cashback);
textbuf := textcat(textbuf, ''  '');
insert into receipts (receipt_num, data) values (trans_num,
textbuf);
END LOOP;



>From the PostgreSQL log file (debug is set to 2), I am getting : 

query: SELECT  transaction_payments.cashback from transaction_payments,
payment_types where transaction_payments.payment_type =
payment_types.idnum
ERROR:  record arow has no field description
DEBUG:  Last error occured while executing PL/pgSQL function
create_receiptp3
DEBUG:  line 105 at assignment
AbortCurrentTransaction

The "arow" record type variable is used quite a lot in previous FOR
loops in this function.  This is the first FOR loop in the function that
uses more than one table though.  I suspect this may have something to
do with it.

As far as I can tell, this SQL statement is valid.  Does anyone have any
ideas how to get this to work.  I have tried several variations, and the
mailing lists don't even have a reference for this error message.

Regards and best wishes,

Justin Clift
Database Administrator

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])



Re: [SQL] quotes in pl/pgsql

2001-03-07 Thread Justin Clift

Hi Najm,

Is this what you mean?

CREATE FUNCTION foobar(int4) returns int4
  as 'DECLARE

  textbuf   varchar(120);

BEGIN

textbuf := ''Example Text '';

insert into sometable (something) values (textbuf);

RETURN 0;
  END;'
LANGUAGE 'plpgsql';


Najm Hashmi wrote:
> 
> Hi all, I just want to know how to put quotes around a string. Is there a
> function to do so?
> If not how can I escape  a single quote.
> Thank you in advance.
> 
>   
> 
> ---(end of broadcast)---
> TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [SQL] Function Vanished

2001-03-26 Thread Justin Clift

Hi would it work to do a pg_dump -d or a pgdumpall, then look through
the dumped sql file?

I do that to retrieve PL/pgSQL functions from the database when I've
accidentally wiped or modified the source (not often, but it happens).

Regards and best wishes,

Justin Clift

Tom Lane wrote:
> 
> "Josh Berkus" <[EMAIL PROTECTED]> writes:
> >   I'm using 7.1 Beta 3, which has been pretty stable up until now.  This
> > morning, I went to export a function I spent 5 hours debugging on on
> > Friday to text so that I could have a copy of the final version.  To my
> > horror, the function was GONE from the system catalog (pg_proc).
> 
> Ick.  Were you maybe working on it inside a transaction that you forgot
> to commit?
> 
> > I have
> > not run VACUUM on the database anytime recently ... is there any
> > possibility that my function is still present as a "deleted" row?
> 
> Should still be there in the table, if you haven't vacuumed.  Getting
> it out again is another story though.  If it was a small enough function,
> good ol' "strings" would do to extract the function body, which is
> probably all that you really need.  But if it's more than a couple K
> then the text will be compressed and difficult to spot or extract.
> 
> regards, tom lane
> 
> ---(end of broadcast)---
> TIP 6: Have you searched our list archives?
> 
> http://www.postgresql.org/search.mpl

---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl



Re: [SQL] Range of Serial values

2001-04-16 Thread Justin Clift

Hi,

I believe you could also create the sequence, then update it with
setval('', );

Regards and best wishes,

Justin Clift

"Poul L. Christiansen" wrote:
> 
> Yes, there is.
> 
> When you create a serial column a sequence is created, which does the
> counting.
> 
> You can create a serial column, drop the associated sequence and create
> a new one with the command:
> "CREATE SEQUENCE seqname START 1000".
> 
> See also "\h CREATE SEQUENCE".
> 
> HTH,
> Poul L. Christansen
> 
> cbell wrote:
> >
> > Hello everyone,
> >
> > when creating a serial column, is there a way to specify which number it
> > will start counting from?  For example, if you wanted all Serial ID's to
> > start at 1000 and count up from there, with no numbers below that.
> >
> > Thanks,
> > Chris.
> >
> > ---(end of broadcast)---
> > TIP 5: Have you checked our extensive FAQ?
> >
> > http://www.postgresql.org/users-lounge/docs/faq.html
> 
> ---(end of broadcast)---
> TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

-- 
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
 - Indira Gandhi

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [SQL] any proper benchmark scripts?

2001-04-19 Thread Justin Clift

Hi Clayton,

Was it opening a new connection to the database every time, or did it
open one connection each time and pump multiple queries through it?

It would be a good things to develop your script and benchmark this both
ways.  Could become a useful tool for sizing both of these databases.

Out of curiosity do you have access to other databases such as
Interbase, Oracle, DB2, Informix, and so forth?  The more it can connect
to, the better people will be able to understand each one's strengths
and weaknesses, in terms of Perl's DB access.

Regards and best wishes,

Justin Clift

Clayton Cottingham aka drfrog wrote:
> 
> hello
> 
> on the modperl list a good thread was happening called
> 'fast db access'
> find attached scripts used to do this
> 
> here are my results:
> 
> [drfrog]$ perl fast_db.pl
> postgres
> 16 wallclock secs ( 0.05 usr +  0.00 sys =  0.05 CPU) @ 400.00/s (n=20)
> mysql
>  3 wallclock secs ( 0.07 usr +  0.00 sys =  0.07 CPU) @ 285.71/s (n=20)
> postgres
> 17 wallclock secs ( 0.06 usr +  0.00 sys =  0.06 CPU) @ 333.33/s (n=20)
> mysql
>  3 wallclock secs ( 0.01 usr +  0.01 sys =  0.02 CPU) @ 1000.00/s (n=20)
> 
> correct me if im wrong but if fast_db.pl is
> working right
> first set is insert
> second set is select
> 
> comp stats
> 
> running stock rpms from mandrake 7.2 for both
> postgresql and mysql
>  3.23.23-beta of mysql and
> 7.02 of postgresql
> 
> [drfrog@nomad desktop]$ uname -a
> Linux nomad.localdomain 2.2.18 #2 Tue Apr 17 22:55:04 PDT 2001 i686 unknown
> 
> [drfrog]$ cat /proc/meminfo
> total:used:free:  shared: buffers:  cached:
> Mem:  257511424 170409984 87101440 24219648 96067584 44507136
> Swap: 2549432320 254943232
> MemTotal:251476 kB
> MemFree:  85060 kB
> MemShared:23652 kB
> Buffers:  93816 kB
> Cached:   43464 kB
> SwapTotal:   248968 kB
> SwapFree:248968 kB
> [drfrog]$ cat /proc/cpuinfo
> processor   : 0
> vendor_id   : AuthenticAMD
> cpu family  : 6
> model   : 3
> model name  : AMD Duron(tm) Processor
> stepping: 1
> cpu MHz : 697.535
> cache size  : 64 KB
> fdiv_bug: no
> hlt_bug : no
> sep_bug : no
> f00f_bug: no
> coma_bug: no
> fpu : yes
> fpu_exception   : yes
> cpuid level : 1
> wp  : yes
> flags   : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat
> pse36 psn mmxext mmx fxsr 3dnowext 3dnow
> bogomips: 1392.64
> 
> i will recomp both the newest postgresql and  mysql
> 
> not using any optimizing techs at all i'll post the
> 
> config scripts i use
> 
> --
> back in the day
> we didn't have no
> old school
> -dr. frog
> http://www.hyperbomb.com
> it sells itself
> 
>   
>  Name: fast_db.pl
>fast_db.plType: Perl Program (application/x-perl)
>  Encoding: base64
> 
> Name: benchmark.sql
>benchmark.sqlType: application/x-unknown-content-type-sql_auto_file
> Encoding: base64
> 
>   
> 
> ---(end of broadcast)---
> TIP 5: Have you checked our extensive FAQ?
> 
> http://www.postgresql.org/users-lounge/docs/faq.html

-- 
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
 - Indira Gandhi

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])



Re: [SQL] error message...

2001-05-15 Thread Justin Clift

Hi Sven,

There is a startup option, "-N" of how many clients are allowed to be
connected simultaneously.  The default is 32 in the source code, not
sure if SuSE has it changed.

You can also alter the default maximum before compiling it, but I get
the feeling you've installed pre-built packages.

Where does SuSE put it's startup scripts?  In /etc/rc.d/init.d ?  If so,
there should be something there relating to PostgreSQL, and it's this
you should modify.

If it starts PostgreSQL with "pg_ctl" then you'll need to pass the
option -o '-N '.  If it starts it with
"postmaster", then use -N  directly, without the
-o.

The man pages for pg_ctl and postmaster should be of some benefit also.

Regards and best wishes,

Justin Clift

"S.E.Franke" wrote:
> 
> Hi I have Postgres 7.0.3/6 on a Suse Professional 7.1 (kernel 2.4.0)
> machine.
> 
> The database is used very often and I see in the logfile the error
> message: Sorry, too many clients already
> 
> Can I set the number of 'active' clients? And where can I set this? And
> How?
> 
> Thanx in advance!
> 
> Sven Franke
> 
> ---(end of broadcast)---
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

-- 
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
 - Indira Gandhi

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])



Re: [SQL] execute client application from PL/pgSql

2001-05-15 Thread Justin Clift

Hi,

It's exact URL is :

http://www.greatbridge.org/project/phppgadmin/projdisplay.php

For PostgreSQL related stuff like this, you can look them up at :

http://techdocs.postgresql.org/oresources.html

I still have to add a lot of the GreatBridge.org projects to it, as
they're expanding quite nicely.

:-)

Regards and best wishes,

Justin Clift

Jeff MacDonald wrote:
> 
> hi,
> 
> phpPGAdmin is a web based php driven postgresql
> admin tool. not sure of the exact url, try
> google :)
> 
> it has a pg_dump option in it.
> 
> jeff
> 
> On Sat, 12 May 2001, datactrl wrote:
> 
> > Date: Sat, 12 May 2001 10:23:39 +1000
> > From: datactrl <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: Re: [SQL] execute client application from PL/pgSql
> >
> > Thank You Jeff,
> > What is phpPgAdmin and where can get it?
> >
> > Jack
> >
> > - Original Message -
> > From: "Jeff MacDonald" <[EMAIL PROTECTED]>
> > To: "Jack" <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Sent: Saturday, May 12, 2001 2:28 AM
> > Subject: Re: [SQL] execute client application from PL/pgSql
> >
> >
> > > you could hack the pg_dump bit out of phpPgAdmin
> > > i think the license permits it.
> > >
> > > just my 2 cents.
> > >
> > > jeff
> > >
> > > On Wed, 9 May 2001, Jack wrote:
> >
> >
> >
> > ---(end of broadcast)---
> > TIP 4: Don't 'kill -9' the postmaster
> >
> 
> ---(end of broadcast)---
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to [EMAIL PROTECTED] so that your
> message can get through to the mailing list cleanly

-- 
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
 - Indira Gandhi

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])



Re: [SQL] system time

2001-05-15 Thread Justin Clift

select now();

???

+ Justin

Seema Noor wrote:
> 
> is there any function from which i can get system time?
> 
> 
> Do You Yahoo!?
> Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> or your free @yahoo.ie address at http://mail.yahoo.ie
> 
> ---(end of broadcast)---
> TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

-- 
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
 - Indira Gandhi

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [SQL] has anyone tried running in MAC OS X

2001-05-18 Thread Justin Clift

Hi,

PostgreSQL 7.1.x does work on MacOS X, there's evan a MacOS X
installation guide at :

http://techdocs.postgresql.org/installguides.php#macosx

Hope that's helpful.  It's mainly focused on Apache + PHP + PostgreSQL
7.1 on MacOS X, although you should be able to make use of it.

If you need further assistance, feel free to ask.

:-)

Regards and best wishes,

Justin Clift


Tom Lane wrote:
> 
> "postgresql" <[EMAIL PROTECTED]> writes:
> > I guess the subject line says ithas anyone tried running
> > PostgreSQL in MAC OS X.
> 
> Some folks at Apple did.
> 
> Postgres 7.1 is alleged to build out-of-the-box on OSX.
> (But I haven't tried it myself.)  Don't bother trying with
> earlier releases.
> 
> regards, tom lane
> 
> ---(end of broadcast)---
> TIP 6: Have you searched our list archives?
> 
> http://www.postgresql.org/search.mpl

-- 
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
 - Indira Gandhi

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



[SQL] Re: [GENERAL] Re: Mirroring the database?

2001-08-14 Thread Justin Clift

There's also PostgreSQL Replicator (which I haven't gotten around to
trying) :

http://pgreplicator.sourceforge.net

:-)

Regards and best wishes,

Justin Clift


Allan Engelhardt wrote:
> 
> Ehhh, use dual-ported RAID disks?  (Well, tri-port in your case, but maybe A and B 
>machines are enough.  You still have a (small) single point of failure, but you 
>probably have that anyhow (network switch?).  You'll need some way of brining 
>PostgreSQL up on B when A dies, but that could be a simple script.  Reconnect would 
>of course be manual from the point of the client.).
> 
> Or buy Oracle.
> 
> Replication is at the top of the TODO list: 
>http://www.uk.postgresql.org/docs/todo.html
> 
> Allan.
> 
> PS:
> Maybe SQLB does some of what you want?  http://sourceforge.net/projects/sqlb/  [The 
>documentation is a little opaque...I'm not quite sure what it does, exactly.  Anybody 
>want to comment?]
> 
> Raymond Chui wrote:
> 
> > Does the latest PostgreSQL 7.1.2 support database mirroring?
> >
> > I have machine A, B and C, they all have the same database and tables.
> > Machine A is the operational machine, machine B and C are backup.
> >
> > If users do INSERT, UPDATE and DELETE in machine A, I want have the
> > same SQL statements in machine B and C.
> >
> > 1. I can do pg_dump or COPY every hour.
> > 2. I can use PerlDBI or JDBC open multiple connections for each SQL
> > statement.
> > 3. But I prefer if the system auto mirroring the database, then I can do
> > nothing.
> > All I need is set the auto mirroring configure.
> >
> > Please tell me how to do in 3. above. Thank you in advance!
> 
> ---(end of broadcast)---
> TIP 4: Don't 'kill -9' the postmaster

-- 
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
   - Indira Gandhi

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]