Re: [GENERAL] Trouble with Innstalling PostGreSQL 6.5.2 on Win NT

1999-10-01 Thread Kevin Lo

Jeff Hoffmann wrote:

> on a related note, i've been thinking about trying out postgres on NT,
> but i've been hesitant to do so because it seems to be a "just because i
> can" port -- maybe not as stable or fast as on a unix system, but neat
> to have.  are people actually using it for serious (ie, it needs to be
> reliable but not necessarily mission critical) work?

Hi, Jeff,

I know Postgres on NT is not as stable as on a UN*X system so far.
Some friends of mine works on NT platform, they just want to learn SQL,
but you know, almost databases on NT are commercial, they are expensive
and they cannot pay it just because they want to learn SQL, right?
Now they can run PostgreSQL on NT, and study more fun :-)
Becuase Postgres is *free* and *open source*, so that's why I port
PostgreSQL to NT.

> jeff

--  `""'
Kevin Lo "Use the Internet to||
[EMAIL PROTECTED]   it's fullest potential" OO--)|
[EMAIL PROTECTED] \__   (_|
[EMAIL PROTECTED] /\ ||
http://www.freebsd.org/~kevlo(=(_><   \








Re: [GENERAL] Trouble with Innstalling PostGreSQL 6.5.2 on Win NT

1999-10-01 Thread Oleg Broytmann

On Fri, 1 Oct 1999, Kevin Lo wrote:
> Some friends of mine works on NT platform, they just want to learn SQL,
> but you know, almost databases on NT are commercial, they are expensive
> and they cannot pay it just because they want to learn SQL, right?

   If you know (or agree to learn) Python programming language I cannot
resist to recommend you to try Gadfly. It is SQL engine written entirely in
Python, and thus it is portable to any platform where python exists
(DOS/Windows/UNIX/Mac/etc). It is free, it is small and simple, but
powerful enough to use it even in commercial projects. To speed things up
some internal parts had been rewritten in C, but I don't know how this work
on NT (on UNIX it is pretty good).

   http://www.chordate.com/gadfly.html

> > jeff

Oleg.
 
Oleg Broytmann http://members.xoom.com/phd2/ [EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.






Re: [GENERAL] ODBC-client->Linux-server: datatype boolean not recognized?

1999-10-01 Thread jose soares


oh! this was for old releases, now I'm using the following:
create function MsBool(bool,int4) returns bool as '
declare
    bool_int int4;
begin
    if $1 is NULL then
   
return NULL;
    end if;
    if $1 is TRUE then

if $2 <> 0 then

return TRUE;

end if;
    else
   
if $2 = 0 then

return TRUE;
   
end if;
 end if;
 return FALSE;
end;
' language 'plpgsql';
create operator = (
    leftarg=bool,
    rightarg=int4,
    procedure=MsBool,
    commutator='=',
    negator='!=',
    restrict=eqsel,
    join=eqjoinsel
    );
 
 
Moray McConnachie ha scritto:
>create function MsAccessBool(bool,int4)  returns
bool
>  as '' language 'internal';
There is surely something missing here, between the empty single
quotes? When I execute that, I get "There is no internal function
msaccessbool"



[GENERAL] query string too long

1999-10-01 Thread leshan

Does any one know a way around the query string too long error?

I am trying to create a view.  Below is the create command and the error
message.

Thank you,
Jd

create view external_job as
select
positions.id as position_id, positions.title as position_title,
external, expire, never, area, subarea, manager, travel, info,
overview, prereqs, functions, created,
contact.title as contact_title, contact.id as contact_id,
address1, address2, address3, fax, email,
city, state, country, region
from positions, location, position_location, contact
where
position_id=positions.id
and location_id=location.id
and contact_id=contact.id
;



hr=> \i internal.sql
create view internal_job as
select
positions.id as position_id, positions.title as position_title,
external, expire, never, area, subarea, manager, travel, info,
overview, prereqs, functions, created,
contact.title as contact_title, contact.id as contact_id,
address1, address2, address3, fax, email,
city, state, country, region
from positions, location, position_location, contact
where
position_id=positions.id
and location_id=location.id
and contact_id=contact.id
;
ERROR:  DefineQueryRewrite: rule plan string too big.
EOF
hr=>










Re: [GENERAL] Trouble with Innstalling PostGreSQL 6.5.2 on Win NT

1999-10-01 Thread Bruce Momjian

> >> I have a web page about installing on WinNT, see:
> >>
> >> http://members.tripod.com/~kevlo/postgres/portNT.html
> >
> > Added to FAQ.
> 
> Bruce,
> 
> I changed URL to http://www.freebsd.org/~kevlo/postgres/portNT.html
> Please update FAQ, thanks. I also update my page, porting 6.5.2
> to NT. BTW, I will update my Chinese page soon.

Done.

-- 
  Bruce Momjian|  http://www.op.net/~candle
  [EMAIL PROTECTED]|  (610) 853-3000
  +  If your life is a hard drive, |  830 Blythe Avenue
  +  Christ can be your backup.|  Drexel Hill, Pennsylvania 19026





[GENERAL] PostgreSQL vs Mysql for website?

1999-10-01 Thread Scott Perkins

In a discussion with a local Linux enthusiast we were discussing which
would be better for a small website project to be driven by PHP and hosted by
nix/nuz and apache.  I have seen that Mysql does not support unions,
transactions, subselects.  PostgreSQL supports subselects and transactions. I
don't know about unions.  In any case
performance is not an issue because of size of project so primary considerations
would be:

1.  learning curve/ease of use/functions supported
1b. quality of documentation
2.  reliability  
3.  availability of prewritten apps for reuse 
4.  others overlooked?


Also, while looking at the PostgreSQL website we noticed this curious
comment at the page containing their comparison chart against competitors which
omitted Mysql.

"This comparison is only a comparison of RDBMSs so MySQL is missing. It may be
added at a later date. "

PostgreSQL Features Comparison Chart -
http://www.postgreSQL.org/doxlist.html

It would appear that  Mysql is not a "RDBMS". Anyone know what it is lacking
that causes it to not be?

Are there major differences in indexing support between the PostgreSQL and
Mysql?

If there is anything sensitive about any of this please email me directly.  
Thanks

Scott Perkins, Atlanta, GA  770/973-3860
Director, VULA (Vintage Ultra and Lightplane Assoc.)




[GENERAL] datetime datatype question

1999-10-01 Thread Kevin Heflin


If from the psql command line I use select current_timestamp it shows like
this:

1999-10-01 14:30:53-05

However if I insert into a datetime field, when I do a select it formats
it like so:

Sun Oct 03 10:00:00 1999 CDT

Is there a way I can retrieve the information from a datetime field, and
format it like the first example ?

Kevin



Kevin Heflin  | ShreveNet, Inc.  | Ph:318.222.2638 x103
Production| 333 Texas St #175| FAX:318.221.6612
[EMAIL PROTECTED]| Shreveport, LA 71101 | http://www.shreve.net







Re: [GENERAL] datetime datatype question

1999-10-01 Thread Patrick Welche

Kevin Heflin wrote:
> 
> 
> If from the psql command line I use select current_timestamp it shows like
> this:
> 
> 1999-10-01 14:30:53-05
> 
> However if I insert into a datetime field, when I do a select it formats
> it like so:
> 
> Sun Oct 03 10:00:00 1999 CDT
> 
> Is there a way I can retrieve the information from a datetime field, and
> format it like the first example ?

rfb=> \h set
Command: set
Description: set run-time environment
Syntax:
SET DATESTYLE TO 'ISO'|'SQL'|'Postgres'|'European'|'US'|'NonEuropean'

it looks like

set datestyle to 'ISO'

to me..

Cheers,

Patrick

PS you could also set the environment variable PGDATESTYLE to ISO...





[GENERAL] alpha and true64 port

1999-10-01 Thread amy cheng

hi, this is kind of emergent!

we are in the process of decision making. Is there an true64 on
alpha port?

thanks in advance!!

amy

__
Get Your Private, Free Email at http://www.hotmail.com





Re: [GENERAL] alpha and true64 port

1999-10-01 Thread Bruce Momjian

> hi, this is kind of emergent!
> 
> we are in the process of decision making. Is there an true64 on
> alpha port?
> 
> thanks in advance!!

We have alpha/osf, but no tru64 that I know of.


-- 
  Bruce Momjian|  http://www.op.net/~candle
  [EMAIL PROTECTED]|  (610) 853-3000
  +  If your life is a hard drive, |  830 Blythe Avenue
  +  Christ can be your backup.|  Drexel Hill, Pennsylvania 19026





[GENERAL] Keeping postmaster running or restarting

1999-10-01 Thread Doran L. Barton

I've been using PostgreSQL since it was Postgres95 and this has always been
a problem- only recently it has become a BIG problem.

I'm running an e-commerce backend using PostgreSQL and it works great but
crashes every once in a while for mysterious reasons and then the whole
company is breathing down my neck about it since we can't accept orders
without a database.

The only hint I've found is this in the log file:

  ERROR:  postmaster: StreamConnection: accept: Network is unreachable

This is PostgreSQL 6.5.2 compiled from source on a RedHat Linux 5.2 (Intel)
system. 

If I can't control this, how can I detect crashes like this and restart
the postmaster quickly? 

-+Fozz

-- 
Doran L. Barton <[EMAIL PROTECTED]>
Iodynamics LLC -- "Internetworking the masses"
http://www.iodynamics.com/>





Re: [GENERAL] How to import data from MDB or pipe delimited file into PostgreSQL

1999-10-01 Thread Doran L. Barton

Not long ago, PostgreSQL proclaimed...
> What is the best way to import into a PostgreSQL database data from a
> Microsoft Access database?
> 
> Should I export the data to a pipe or comma delimited file and then import?
> *But how can I do that* ?

Once you have an Access table exported using some kind of delimiter, use
the COPY command to import it into a table in PostgreSQL. 

psql> COPY INTO TABLE1 FROM '/home/joe/access_export.csv' USING 
  USING DELIMITER ',';

I'm not aware of any way to import table schemas from Access- you'll
probably still have to do that by hand. 

-=Fozz

-- 
Doran L. Barton <[EMAIL PROTECTED]>
Iodynamics LLC -- "Internetworking the masses"
http://www.iodynamics.com/>





[GENERAL] How to import data from MDB or pipe delimited file into PostgreSQL

1999-10-01 Thread PostgreSQL

What is the best way to import into a PostgreSQL database data from a
Microsoft Access database?

Should I export the data to a pipe or comma delimited file and then import?
*But how can I do that* ?

With mSQL it is easy, it has already a builtin function where you specify
the name of the text file you are importing, the database and table to input
the data, which character should be treated as a separator (comma, pipe,
etc.).

TIA,
Paulo







Re: [GENERAL] PostgreSQL vs Mysql for website?

1999-10-01 Thread Bruce Momjian

> In a discussion with a local Linux enthusiast we were discussing which
> would be better for a small website project to be driven by PHP and hosted by
> nix/nuz and apache.  I have seen that Mysql does not support unions,
> transactions, subselects.  PostgreSQL supports subselects and transactions. I
> don't know about unions.  In any case
> performance is not an issue because of size of project so primary considerations
> would be:
> 
> 1.  learning curve/ease of use/functions supported
> 1b. quality of documentation
> 2.  reliability  
> 3.  availability of prewritten apps for reuse 
> 4.  others overlooked?
> 

Please see the FAQ item on the web site discussing comparisons between
PostgreSQL and other dbms's.  I can answer any questions you have.

-- 
  Bruce Momjian|  http://www.op.net/~candle
  [EMAIL PROTECTED]|  (610) 853-3000
  +  If your life is a hard drive, |  830 Blythe Avenue
  +  Christ can be your backup.|  Drexel Hill, Pennsylvania 19026





Re: [GENERAL] alpha and true64 port

1999-10-01 Thread Adriaan Joubert

Bruce Momjian wrote:

> > hi, this is kind of emergent!
> >
> > we are in the process of decision making. Is there an true64 on
> > alpha port?
> >
> > thanks in advance!!
>
> We have alpha/osf, but no tru64 that I know of.

Tru64 is just a renaming of Digital Unix / OSF/1(Those Compaq people can't
spell, where is good old digital with a line-long engineering number you
can't remember?)

Postgres runs fine on Alphas, but you need to use the cc compiler, i.e.
compile with template alpha_cc. And you need to use 6.5.2. I think I sent in
a couple of minor patches -- have a look at the mailing list archive.

Adriaan






Re: [GENERAL] How to import data from MDB or pipe delimited file into PostgreSQL

1999-10-01 Thread Mike Mascari

--- "Doran L. Barton" <[EMAIL PROTECTED]> wrote:
> Not long ago, PostgreSQL proclaimed...
> > What is the best way to import into a PostgreSQL
> database data from a
> > Microsoft Access database?
> > 
> > Should I export the data to a pipe or comma
> delimited file and then import?
> > *But how can I do that* ?
> 
> Once you have an Access table exported using some
> kind of delimiter, use
> the COPY command to import it into a table in
> PostgreSQL. 
> 
> psql> COPY INTO TABLE1 FROM
> '/home/joe/access_export.csv' USING 
>   USING DELIMITER ',';
> 
> I'm not aware of any way to import table schemas
> from Access- you'll
> probably still have to do that by hand. 
> 
> -=Fozz

One way is to (a) install and configure the 
PostgreSQL ODBC driver, and (b) export the selected
tables to PostgreSQL via ODBC using the 
File->Save As/Export... command. The ODBC driver will
automatically issue the appropriate CREATE TABLE
statement and insert the data from the existing 
Access database. However, you may not be satisfied
with the data-type mapping the ODBC driver chooses
to generate for your existing tables.  

Another way is to use a PostgreSQL upsizing tool.
I have seen a post on this list several months ago
regarding this tool, which looks promising. The
search engine for the mailing list archives at
www.postgresql.org appeared broken as of a couple of 
days ago and I don't have the URL to the page, but an 
upsizing tool does, indeed, exist.

Good luck, 

Mike Mascari
([EMAIL PROTECTED])

=

__
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com