[GENERAL] Windows Installation Problem

2010-07-05 Thread Len Morgan
I'm trying to install PostgreSQL 8.2 on a Windows 7 machine.  I had 
started with 8.3 but installation stalled and after about 20 minutes I 
had to eventually kill it.  When I try and run the 8.2 install, it just 
about gets ready and then tells me that another installation is running 
(this is after a reboot) and won't continue.


What do I have to do to convince the installer that I'm NOT running 
another instance of the install program?  Is something written in the 
registry?


len morgan

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] is it tcl problem or pg problem?

2001-08-27 Thread Len Morgan

Have you tried running a "dummy" script that just returns say a number to
see if you get the same error?  If I'm not mistaken, the return value from
"exec" in Tcl is the return value from the command you execute (i.e., 0 if
successful, etc).  While you can "print" from the program, I'm not sure you
can capture just that value.  You might also want to make sure that you are
doing a real "exit" from your script and not just letting it "fall through"

len morgan

----- Original Message -
From: <[EMAIL PROTECTED]>
To: "Len Morgan" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, August 27, 2001 10:43 AM
Subject: Re: [GENERAL] is it tcl problem or pg problem?


> On Mon, Aug 27, 2001 at 09:07:34AM -0500, Len Morgan wrote:
> > Try:
> >
> > catch { eval exec $NEW($1)} data
> >
> > I'm not sure that this will solve the problem but executing commands
from
>
> It did not :(
>
> > commands?  Perhaps your "date" example was just an example (because you
can
> > use now()::date from within Postgres).
>
> What I really want to do is run something like
> at -f file 13:10 8/31/2001
> and then capture "at" job number.
>
> What I really want to get is "at" job number
> and because I know perl better I am actually
> going call a perl script from tcl.  Perl
> will call "at" and parse job number and
> print it.  Tcl will catch the number and
> put in a database column
>


---(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



Re: [GENERAL] valid NULL DATE value

2001-08-24 Thread Len Morgan

> I am importing via pgaccess a text file from another non-postgres
> database and the NULL DATE values are written like 00/00/00.
>
> What I have tried is replacing 00/00/00 by 9/9/1999 and setting the
> style to european and I am getting 'can't parse /9/1999' errors.

Try replacing 00/00/00 with NULL in the text file.  If the text file is
organized to be read by the COPY command, then use \N instead.

len morgan


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



Re: [GENERAL] concurent updates

2001-07-26 Thread Len Morgan

Unless you have over simplified your example, why do you have two tables?
Wouldn't:

create table table1 (id int primary key, col1 int, col2 int)

do the same thing in one table?  I would think that ANY schema that has two
tables with the SAME primary key can be resolved to one table without losing
anything.

len morgan

> create table table1 (id int primary key, col1 int);
> create table table2 (id int primary key references table1(id), col2 int);
>
> and the 2 updates :
>
> 1) update table2 set id = 1001 where id = 1;
> 2) update table1 set id = 1001 where id = 1;
>
> i can't execute them separately because of an integrity constraint
> violation.
> i've got the same error in a BEGIN / COMMIT block containing the updates.
>
> Does any one see how two help me ?
>
> thanks.
>
>
> ---(end of broadcast)---
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
>
>
>
>
>
> ---(end of broadcast)---
> TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
>


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



Re: [GENERAL] "trigger"ing a procedure every X minutes

2001-06-06 Thread Len Morgan

>> It's certainly not a big deal to use the cron, I just thought maybe
someone
>> had experimented with an internal mechanism.  I'd like to try it someday,
>> when I know a lot more about Pg.  My current project has an ever-growing
>> number of cron jobs (up to 6 now) and was just thinking about various
ways to
>> tidy it up.
>
>If you like to avoid the aid of your OS maybe Perl is your friend. There
>is a library Schedule::Cron which does the same as the crontab. I guess
>portability is given if you have your scheduler on the application level.


You might also be able to use pl/tcl's after function to do the same thing.

len morgan


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



Re: [GENERAL] COPY with default values?

2001-05-25 Thread Len Morgan

You are correct and if you did your bulk insert with INSERT commands, it
will work just fine.  The difference is the COPY command which AFAIK was/is
intended for backup and restore use.

len morgan

-Original Message-
From: Jeff Boes <[EMAIL PROTECTED]>
To: Postgres-general <[EMAIL PROTECTED]>
Date: Friday, May 25, 2001 10:25 AM
Subject: Re: [GENERAL] COPY with default values?


>On Fri, 25 May 2001 10:33:41 -0400
>Tom Lane <[EMAIL PROTECTED]> wrote:
>
>> COPY does not deal with insertion of default values.  Sorry.
>
>This seems odd to me, especially since Pgsql treats
>
>INSERT INTO keywords (key_id, key_text) VALUES (null, 'foo');
>
>differently than
>
>INSERT INTO keywords (key_text) VALUES ('foo');
>
>It's been a while, but I'm pretty sure Oracle will do the same thing for
>each of these inserts, namely apply a default value when a null is
>detected.
>
>But thanks for the help!
>
>--
>Jeff Boes vox 616.226.9550
>Database Engineer fax 616.349.9076
>Nexcerpt, Inc.  [EMAIL PROTECTED]
>
>
>---(end of broadcast)---
>TIP 2: you can get off all lists at once with the unregister command
>(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
>


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



Re: [GENERAL] COPY with default values?

2001-05-25 Thread Len Morgan

I believe COPY is limited to reading ENTIRE records into a table not pieces
of them.

len morgan

-Original Message-
From: Jeff Boes <[EMAIL PROTECTED]>
To: Postgres-general <[EMAIL PROTECTED]>
Date: Friday, May 25, 2001 9:20 AM
Subject: [GENERAL] COPY with default values?


>Let's say I have a table of keywords, with a SERIAL primary key.
>
>CREATE TABLE keywords (
>  key_id  SERIAL PRIMARY KEY,
>  key_text TEXT
>);
>
>Now I would like to initialize this table with a COPY statement, but
>without supplying values for the primary key. In other words, how can I
>use COPY to perform the same function as
>
>INSERT INTO keywords (keyword_text) VALUES ('foo');
>INSERT INTO keywords (keyword_text) VALUES ('bar');
>...
>
>I have tried
>
>COPY keywords FROM stdin USING DELIMITERS '|';
>|foo
>|bar
>...
>
>and also
>
>0|foo
>0|bar
>
>and even
>
>\N|foo
>\N|bar
>
>I even tried creating a view on keywords that has only keyword_text, and
>copying into THAT--no luck. Then I wrote a rule to replace inserts on the
>view with inserts on the table, but apparently COPY doesn't trigger INSERT
>rules. Grumble...
>
>
>--
>Jeff Boes vox 616.226.9550
>Database Engineer fax 616.349.9076
>Nexcerpt, Inc.  [EMAIL PROTECTED]
>
>
>---(end of broadcast)---
>TIP 5: Have you checked our extensive FAQ?
>
>http://www.postgresql.org/users-lounge/docs/faq.html
>


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



Re: [GENERAL] LIKE erratic? or unseen DB corruption?

2001-05-21 Thread Len Morgan

Is it possible that there are spaces after the 'IDC16W' in the field?  Try:

LIKE 'IDC16W%'

and see if that makes a difference.

len

>A direct query gets appropriate rows of data:
>
>dbname=# select * from partdef where shpname = 'IDC16W';
> pn_id | class | num  | mt | ver | loc_id | unit_id | subptcnt |
shpname  |   value| descrip
>---+---+--++-++-+--+---
---++-
>17 | 328   | 08X2 | 0  | 0   || |1 | IDC16W
| Header-8x2 |
>11 | 323   | 08X2 | 0  | 0   || |1 | IDC16W
| Header-8x2 |
>
>...while the very same query (substituting LIKE for the '=' sign) gets
nothing!?
>
>dbname=# select * from partdef where shpname LIKE 'IDC16W';
> pn_id | class | num | mt | ver | loc_id | unit_id | subptcnt | shpname |
value | descrip
>---+---+-++-++-+--+-+--
-+-
>(0 rows)
>




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



Re: [GENERAL] SQL Where Like - Range it?!

2001-04-27 Thread Len Morgan

>What I'd like to do is pull a list of records where there is a range of
>last names; say from A - F.
>select * from table where last_name LIKE 'A%' AND last_name LIKE 'F%' -
>for example.
>
>The above code I've tried for this doesn't seem to work as I'd expect it
>too?

SELECT * FROM table WHERE last_name BETWEEN 'A' AND 'Fz' ;
worked for me.

You could also use BETWEEN 'A' AND 'G' to avoid all of the s at the
end.  Crude but effective.

len morgan


---(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



Re: [GENERAL] CREATE TABLE AS... syntax?

2001-04-25 Thread Len Morgan

>CREATE TABLE foo (test INT4) AS SELECT number FROM account; 

I think you want something like:

SELECT number INTO TABLE foo FROM account ;

len morgan


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



Re: [GENERAL] Yet another Performance Question

2001-04-18 Thread Len Morgan

>I once read in Oracle Performance Tuning, that if one inserts or changes
large
>amounts of data in a table, it might be better to drop indices before doing
>this and recreating them afterwards. Could someone give a hint on how this
>is in Postgres 7.1? Currently I am experiencing a massive slowdown in
importing
>data.

Postgres "suffers" the same problem which is very logical if you think about
it.  Inserts must adjust the indexes for every record and don't really know
that there are a lot of other rows comming.  Also, due to the multiuser
nature of Postgres, other users could be accessing data between your rows of
inserts and that data must be valid at that time.

A non-indexed version of a table is just as accessible as an indexed one
(though not as fast) so you have to decide if it's better to slow down a
query or two while you insert/index or spend much more time having a good
index after each insert.

What would be nice is a simple "disable indexes on this (these) tables"
command.  The enable indexes command would then do a vacuum analyze on
the effected tables when you were done.  This would make sure that ALL of
the indexes got rebuilt (I occationally forget an index when doing it "by
hand").

len morgan


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



[GENERAL] 7.1 SRPM woes (Mandrake 7.2)

2001-04-14 Thread Len Morgan

I'm sure my problem relates more to my ignorance than the srpm set but here
goes:

I am trying to build on a Mandrake 7.2 system (rpm v3.0.5)

The source install (rpm -i postgresql-7.1-1.src.rpm) seemed to do everything
it was supposed to.  I followed the directions in the README.rpm-dist file
as far as they went.  I assume that the "rpm building area" is /usr/src/RPM
on Mandrake and CDed there.

According to "Maximum RPM" page 132, I should only have to type:

rpm -ba postgresql-7.1-1.spec and all will be right with the world.
Instead, I get several pages of messages (I can't seem to |more them or > to
a file) the last one being about a failed dependancy for Python.  When I
installed the Mandrake, I told it to install EVERYTHING so I don't think I
should be missing any compilers/libraries/headers etc.

Am I missing something?  I am assuming that since Mandrake RPMs were done
before, they are not the same as the RedHat RPMs and I will have to rebuild
from source.  I tried the build from the RPM directory (as stated above) and
from the SPECS directory as stated in the "Maximum RPM" book both with the
same result.

Advice?  I'll be more than glad to upload my finished RPMs when I'm done.

Len Morgan


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

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



Re: [GENERAL] FW: Dbf to Pg converter

2001-02-19 Thread Len Morgan

Was there something wrong with dbf2sql?  :-)  It used to be in contribs/ I
think but it was very simple code that did the job.  At the time I was
working with 1.x and 6.0x versions of Postgres and made a few mods to it so
that I could rename the tables, change field types, just export the data and
not the table definitions, etc.

The last version I saw was 3.0 but that's been a couple of years.

len morgan




Re: [GENERAL] Lower record

2000-12-29 Thread Len Morgan

>... I also cant use the following:
>
>$sql = "select threadid, commentid, name, detail from comments where
>commentid < '$commentid' and threadid='$threadid'";
>
>
> because it gets the lowest value comment whereas what I want is the
highest
>value comment but lower that $commentid (so basically the one immediately
>below this one).


How about:

select threadid, commentid, name detail from comments where
comentid < '$commentid' and threadid='$threadid'
ORDER BY commentid DESC LIMIT 1 ;

The ORDER BY ... DESC  will put the highest commentid first and the LIMIT 1
will only return one record.


Len Morgan





Re: [GENERAL] windows UI tool???

2000-09-15 Thread Len Morgan

You might also try pg_access which comes with postgres.  You will have to
install Tcl/Tk on the windows machine but that is available on the Net.  As
far as ACCESS goes, I think ODBC is the ONLY way you are going to connect to
Postgres but it DOES work just fine.  There are some things you have to
watch out for (i.e, I have NEVER been able to get ACCESS to support fix char
length fields, it will only export varchar).

Len Morgan

-Original Message-
From: chris markiewicz <[EMAIL PROTECTED]>
To: Postgres (E-mail) <[EMAIL PROTECTED]>
Date: Friday, September 15, 2000 12:59 PM
Subject: [GENERAL] windows UI tool???


>hello.
>
>can anyone recommend a windows ui tool for viewing data in postgres?
>essentially i want to use something other than the command line for looking
>at results.  as an emample, i'm looking for the equivalent of TOAD for
>Oracle.  is the easiest approach to connect in MS Access via odbc?
>
>thanks
>chris
>
>




[GENERAL] pg_dump help

2000-08-07 Thread Len Morgan

I am trying to copy a table from my local database to a client's.  The
problem is I keep getting a message from pg_dump:

"can't find template1 database.  You are really hosed."

The docs say that this usually means the postmaster is not running but it
is.  In fact, I can get into the database and do whatever I want to with it.
Over the weekend I did try and install the 7.0.2 RPMS without much luck.  I
uninstalled them and reinstalled 6.5.1-3.  I then reloaded my databases.
This is the first time I've done a pg_dump since.  pg_dumpall gives me the
same error.

If you've got any advice on how I can save these two tables I need so I can
get them to my customer I'd appreciate it.

Redhat 6.0 OS

len morgan




Re: [GENERAL] MOD

2000-07-17 Thread Len Morgan

>Not asking you to figure it out in this context,
>but just what does MOD do?
>
>
>$sqh = $dbh->prepare("select
>name,namelink,address,city,state,zip,email
>from company where MOD(nextscreen,2)=1 order
>by $sort_selection;");
>$sqh->execute();
>

I believe it's just trying to figure out if "nextscreen" is odd or even.  1
would odd, 0 even.

len morgan




Re: [GENERAL] Help: How to store query output in a file !!!

2000-06-14 Thread Len Morgan

>From psql:

test => \o 
test => 
test => \o

This will leave the results of your query in the file "output-file-name"

This IS covered in the documentation and from within psql with \h

len morgan

-Original Message-
From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
To: NEERAJ BANSAL <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Wednesday, June 14, 2000 2:46 AM
Subject: Re: [GENERAL] Help: How to store query output in a file !!! 


>> 
>> Does anyone knows how do you send query output to a file???
>
>Welcome to Unix(TM):
>
>psql  -c "select * from , etc." > 
>
>See also:
>
>http://www.isu.edu/departments/comcom/unix/workshop/io.html
>
>or, type "unix tutorial" in any web search engine.
>
>--Gene
>
>> I tried following but it does not work:
>> select * from  \o  ;
>> 
>> Please let me know if anyone knows!! Thanks in advance
>> 
>> Neeraj
>> [EMAIL PROTECTED]
>
>




Re: [GENERAL] initdb and "exit_nicely"...

2000-05-18 Thread Len Morgan


>> A slightly more reasonable example is where the admin has already
>> inserted his own pg_hba.conf in the directory; would be nice if initdb
>> didn't overwrite it (nor delete it on failure), but I'm not sure it's
>> worth the trouble.
>
>I am inclined to leave it as is too.  I can imagine many bug reports if
>that directory is not flushed on failure.
>


I'm no expert on shell scripts, but couldn't the current initdb script be
wrapped by something like:

if exists PG_DATA directory {
create a file listing all of the filenames currently in the directory
called "pre-existing.files"
}

current initdb script ...

if exists "pre-existing.files" {
delete all files in PG_DATA dir except those in pre-existing.files
}

The reason that IMHO this deserves a little consideration (i.e., doing it at
all rather than just saying "Don't store any files in PG_DATA") is that
RedHat based rpm installations create the postgres superuser account as part
of the process and set the home directory for this user to PG_DATA.  I do a
lot of remote administration of Postgresql systems and frequently telnet
into them as user postgres which leaves me in the PG_DATA directory.  I'll
upload a file or two and not really think about where I am.

I don't personally know what the effect of already having the postgres user
account set up with a different home directory does to an RPM. Perhaps the
rpm maintainer could create the postgres user account with a home directory
of /home/postgres instead of PG_DATA?

Anyway, my 0.02 dollar's worth.

len morgan




Re: [GENERAL] why so big?

2000-05-17 Thread Len Morgan

-Original Message-
From: Joseph Shraibman <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Wednesday, May 17, 2000 4:33 PM
Subject: [GENERAL] why so big?


>I've just created a new database and I am wondering...
>
>Why are all sequence files 8K?  They're one freaking int.
>
>How come the indexes are so large?  They tend to be larger than the
>database files themselves.  In one case I have a 16K index on an empty
>table

Overhead!  I think you will find that 8K is the smallest file that can be
allocated if you add one record to a table, the index isn't going to get any
bigger for a while until it fills up the 16K.







[GENERAL] Offical 6.5 release

1999-04-22 Thread Len Morgan

Has any tentative date been set for the 6.5 release?  I have just about
convinced my company to replace their current plans to use a HUGE Oracle 8
database on NT with PostgreSQL on Linux.  We will need to roll out working
systems in 2 months or so and 6.5 has a lot of features that I would like to
have.  I'd rather not roll out 6.4.2 and then have to go to 20 different
sites and upgrade them to 6.5 later unless that upgrade process will be
easier than it has been in the past.

Thanks

Len Morgan