Re: [SQL] postmaster: init.d/start

2000-06-13 Thread Thomas Mack

>Hi Daniel,
>
>thank you for your reply.
>
>There are some unanswered questions.
>Why does one have to consider multiple run levels? Doesn't run level 3
>(network + X) implicate run level 2 (network)?

Not on SuSE Linux. On SOlaris for example, you will find in /etc/inittab
an entry like:

s2:23:wait:/sbin/rc2

with the meaning that /sbin/rc2 will be executed in runlevel 2 AND 3 as
well. So all the scripts in rc2.d will be started in runlevel 3 as well
(on Solaris).

In SuSE you find:

l2:2:wait:/sbin/init.d/rc 2
l3:3:wait:/sbin/init.d/rc 3

So each runlevel just starts its scripts only.

>So if I don't use XDM (or equivalent) and the system starts with a login
>shell only, it would start run level 2 services. And if I use XDM and
>the system starts using X it would also load run level 2 services?
>
No, not on SuSE. But you can change your /etc/inittab, if you like to have
this behaviour. Actually, you will find (almost?) all scripts from
/sbin/init.d/rc2.d doubled in /sbin/init.d/rc3.d for the reason, that
runlevel 3 does NOT start the scripts for runlevel 2.


Thomas Mack
TU Braunschweig, Abt. Informationssysteme



Re: [SQL] question on diagnostics

2000-06-13 Thread Bruce Momjian

I can confirm this is still a bug.


> > > oh, btw this select refused to use an SQL natural join among the 3
> > > relations - the server gives up and disconnects without warning.
> > 
> > That sounds like a garden-variety bug.  I'd be willing to look at it
> > if I had a complete example to follow, but I don't want to try to
> > reverse-engineer your table definitions...
> 
> a join with 3 tables never seems to work:
> 
> test=# create table a(a int);
> CREATE
> test=# create table b(a int);
> CREATE
> test=# create table c(a int);
> CREATE
> test=# insert into a values (1);
> INSERT 23734 1
> test=# insert into b values (1);
> INSERT 23744 1
> test=# insert into c values (1);
> INSERT 23736 1
> test=# select * 
> test-# from a, b, c
> test-# where a.a = b.a AND
> test-#   b.a = c.a;
>  a | a | a 
> ---+---+---
>  1 | 1 | 1
> (1 row)
> test=# select * from a natural inner join b natural inner join c;
> pqReadData() -- backend closed the channel unexpectedly.
> This probably means the backend terminated abnormally
> before or while processing the request.
> The connection to the server was lost. Attempting reset: Failed.
> 
> 
> alex
> 
> 


-- 
  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: [SQL] question on diagnostics

2000-06-13 Thread Tom Lane

Bruce Momjian <[EMAIL PROTECTED]> writes:
> I can confirm this is still a bug.

Yeah, it's a parser problem.  I punted it in Lockhart's direction, but
he's been out of town...

regards, tom lane


>> oh, btw this select refused to use an SQL natural join among the 3
>> relations - the server gives up and disconnects without warning.
 
 That sounds like a garden-variety bug.  I'd be willing to look at it
 if I had a complete example to follow, but I don't want to try to
 reverse-engineer your table definitions...
>> 
>> a join with 3 tables never seems to work:
>> 
>> test=# create table a(a int);
>> CREATE
>> test=# create table b(a int);
>> CREATE
>> test=# create table c(a int);
>> CREATE
>> test=# insert into a values (1);
>> INSERT 23734 1
>> test=# insert into b values (1);
>> INSERT 23744 1
>> test=# insert into c values (1);
>> INSERT 23736 1
>> test=# select * 
>> test-# from a, b, c
>> test-# where a.a = b.a AND
>> test-#   b.a = c.a;
>> a | a | a 
>> ---+---+---
>> 1 | 1 | 1
>> (1 row)
>> test=# select * from a natural inner join b natural inner join c;
>> pqReadData() -- backend closed the channel unexpectedly.
>> This probably means the backend terminated abnormally
>> before or while processing the request.
>> The connection to the server was lost. Attempting reset: Failed.



Re: [SQL] sql foregein key

2000-06-13 Thread Jan Wieck

GANESH KUMAR wrote:
>
> sir ,
>
> i am working 6.5.2 postgresql
> in creation foregein key in table
>
> syntax i am writing is
> 1)create table gk
> (sno  int primary key);
>
> 2)create table kk
> (sno int references gk,
> sname varchar(2));
> i am getting message like this foregein key is not
> implemented .
> please write which version it supports .
> please send reply assp

FOREIGN KEY is implemented in v7.0.


Jan

--

#==#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.  #
#== [EMAIL PROTECTED] #





[SQL] Re: Simple search question

2000-06-13 Thread John McKown

On Tue, 13 Jun 2000 12:15:17 +1000, Alex <[EMAIL PROTECTED]> wrote:
[snip]
>
>> so I can't test this. If it doesn't work, I'd try using pg_GetLastOid()
>> to get the OID of the inserted row. The use the pg_Exec and SELECT
>> * WHERE OID=oid-value, followed by pg_fetch_row().
>
>Thanks John, and the other person that replied to my email (I know it is a
>bit of a stupid question, but in such an unpopulated list, I don't think
>there's any reason to post privately).
> This leads to another question. If someone adds another row during this,
>what will happen?

>From what I can tell, the function pg_GetLastOid() does not do a database
query. It appears that it simply fetches a value which was returned by
PostgreSQL during the pg_Exec() call. Therefore, there should not be any
problem with another, concurrent, execution of this PHP script. The
pg_GetLastOid() is really more of pg_GetLastOid_of_this_execution, not
"global" to the database (not GetLastOid_of_the_entire_database).



[SQL] dump from access to pg on linux

2000-06-13 Thread rocael

Hi all!

I have a DB in access, and I wanna pass it to pg7 on my linux box, do somebody
know which is the best (and easy) way to do that?? like a dump??

thanx,

Rocael.


Get free email and a permanent address at http://www.netaddress.com/?N=1



[SQL] Q:Postgres 7.0 & Access'97?

2000-06-13 Thread Emils Klotins

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,

I am using Postgres 7.0 on SuSE Linux 6.2 and Postdrv.exe 
6.50. (as downloaded from /latest/ dir of PG FTP site 
yesterday).

Now, I have experienced 4 issues immediately with Postgres via 
ODBC from Access and I was wondering whether you could have 
any idea what could possibly be done about them:

1. Every time a query runs from Access, I get an error on the server 
coneole:
pq_recvbuf: EOF the client closed the connection unexpectedly
The query seems to run fine though.

2. The tables on the SQL server were exported from Access tables, 
using Access' File | Export -> ODBC connection.

Now I can only access them from psql monitor if I enclose both the 
table and field names in double quotes, like "Field1". The 
tables/fields do have alphanumeric chars in them only (A-z,0-9). If I 
try to access table "Test" like: 
\d Test, I get: can't find relation 'test'.
(Note the caps both in table name & error msg)
\d "Test" works.

3. The connection seems to be QUITE slow (approximately 1-2 
seconds to show a form in Access), considering that the total of 19 
tables in the dbase contain a maximum of a couple of thousand of 
rows (I think even less). The server is a HP Netserver PIII650 and 
does not at the moment run anything else. The client computer is 
not very up-to-date, yet the same Access db with local tables runs 
practically instantly.

4. This is almost definitely an Access problem, but even if so: are 
there any workarounds available?
A WHERE clause that compares a boolean value with a boolean 
constant gives error: can't compare bool and int, use explicit cast.

Ie. in Access trying to use a SELECT  WHERE a=True , yields 
the above error, considering that a is a boolean field.
Same query works from psql monitor.

Thanks a LOT in advance for any comments.

Emils, trying to make Access frontend work with Postgres 
backend.



-BEGIN PGP SIGNATURE-
Version: PGP 6.5.2 -- QDPGP 2.61a
Comment: http://community.wow.net/grt/qdpgp.html

iQA/AwUBOUYsHd0sxa1MAPWHEQKd5gCgyNG2ZXSYrfTC8w6nS3Dm4zdp7RAAn2wH
UveKFCmxHqDeGmJT1BpfyvhQ
=ZVIv
-END PGP SIGNATURE-



Re: [SQL] dump from access to pg on linux

2000-06-13 Thread Yury Don

Hello rocael,

Once, Wednesday, June 14, 2000, 12:11:40 AM, you wrote:

run> I have a DB in access, and I wanna pass it to pg7 on my linux box, do somebody
run> know which is the best (and easy) way to do that?? like a dump??

We used Pgupt for this: http://dspace.dial.pipex.com/boylesa/pgupt/pgupt.shtml
Also look at the http://www.sevainc.com/Access/index.html

-- 
Best regards,
 Yury  ICQ 11831432
 mailto:[EMAIL PROTECTED]





Fwd: RE: [SQL] dump from access to pg on linux

2000-06-13 Thread Yury Don

This is a forwarded message
From: Fred Lecul <[EMAIL PROTECTED]>
To: Yury Don <[EMAIL PROTECTED]>
Date: Wednesday, June 14, 2000, 10:45:55 AM
Subject: [SQL] dump from access to pg on linux

===8<==Original message text===
I did this by using the postgres odbc drivers, I linked the postgres tables
in access
then I created an append query of the data I wanted to dump.
this worked without problems and was reasonably fast.
The only problem is you have to create the tables in postgres first.
I noticed another option that is to import to postgres, odbc text files that
youve created in access.
There may be other ways, but I hope this helps

Fred


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
> Of Yury Don
> Sent: Wednesday, 14 June 2000 13:32
> To: [EMAIL PROTECTED]
> Subject: Re: [SQL] dump from access to pg on linux
>
>
> Hello rocael,
>
> Once, Wednesday, June 14, 2000, 12:11:40 AM, you wrote:
>
> run> I have a DB in access, and I wanna pass it to pg7 on my
> linux box, do somebody
> run> know which is the best (and easy) way to do that?? like a dump??
>
> We used Pgupt for this:
> http://dspace.dial.pipex.com/boylesa/pgupt/pgupt.shtml
> Also look at the http://www.sevainc.com/Access/index.html
>
> --
> Best regards,
>  Yury  ICQ 11831432
>  mailto:[EMAIL PROTECTED]
>
>
>



===8<===End of original message text===



-- 
 Yury  ICQ 11831432
 mailto:[EMAIL PROTECTED]