agora inbox for postgres@postgres.berkeley.edu
help / color / mirror / Atom feedRe: HELP !!!!!
17+ messages / 14 participants
[nested] [flat]
* HELP !!!!!
@ 1992-05-27 14:15 Ludhi Sidikpramana <lxs@philabs.Philips.Com>
1992-05-27 08:26 ` Re: HELP !!!!! mao@postgres.berkeley.edu
0 siblings, 1 reply; 17+ messages in thread
From: Ludhi Sidikpramana @ 1992-05-27 14:15 UTC (permalink / raw)
To: legacy; +Cc: lxs@uunet.UU.NET
----------
X-Sun-Data-Type: text
X-Sun-Data-Description: text
X-Sun-Data-Name: text
X-Sun-Content-Lines: 50
Hi, could anyone tell me what I did wrong either in installation or
in my postquel progs.
Installation: SUN Sparc II station running SunOS 4.1.1
-------------
% cd newconf; ./Make install -> sparc
It compiled successfully!
The database:
* retrieve (emp.all) \g
Query sent to backend is "retrieve (emp.all) "
---------------------------------------------------------
| name | office | phone | salary |
---------------------------------------------------------
| ludhi | D-256 | (null) | 200 |
---------------------------------------------------------
| ludhi | D-255 | (null) | 200 |
---------------------------------------------------------
where name=char[], office=char[], phone=char[], salary=int4
Postquel:
---------
Problem: It seems that I cannot do strings comparison
EG: retrieve (emp.office) where emp.name="ludhi" \g
Query sent to backend is "retrieve (emp.office) where emp.name="ludhi" "
WARN:May 27 09:09:10:OperatorDef: no operator =
I thought that postgres has the basic operator for strings equality. It works
fine for int4
* retrieve (emp.office) where emp.salary=200\g
Query sent to backend is "retrieve (emp.office) where emp.salary=200"
---------------
| office |
---------------
| D-256 |
---------------
| D-255 |
--------------
Attached is the script.....
Thanks
----------
X-Sun-Data-Type: default
X-Sun-Data-Description: default
X-Sun-Data-Name: pg.problems
X-Sun-Content-Lines: 109
Script started on Wed May 27 08:36:38 1992
Ra% createdb junk
Ra% monitor junk
Welcome to the C POSTGRES terminal monitor
Go
* create (name=char[],office=char[])\g
Query sent to backend is "create emp (name=char[], office=char[])"
CREATE
Go
* append emp ( name="sidik", office="D-256")\g`
Query sent to backend is "append emp ( name="sidik", office="D-256")"
APPEND
Go
* append emp (name="sudheer", office="D-255")\g
Query sent to backend is "append emp (name="sudheer", office="D-255")"
APPEND
Go
* retrieve (emp.all)\g
Query sent to backend is "retrieve (emp.all)"
-----------------------------
| name | office |
-----------------------------
| sidik | D-256 |
-----------------------------
| sudheer | D-255 |
-----------------------------
Go
* addattr (phone=char[]) to emp\g
Query sent to backend is "addattr (phone=char[]) to emp"
ADD
Go
*
retrieve (emp.all) \g
Query sent to backend is "retrieve (emp.all) "
-------------------------------------------
| name | office | phone |
-------------------------------------------
| sidik | D-256 | (null) |
-------------------------------------------
| sudheer | D-255 | (null) |
-------------------------------------------
Go
* retrieve (emp.name) where emp.office="D-256" \g
Query sent to backend is "retrieve (emp.name) where emp.office="D-256" "
WARN:May 27 08:42:14:OperatorDef: no operator =
Go
* addattr (salary=int4) to emp \g
Query sent to backend is "addattr (salary=int4) to emp "
ADD
Go
* replace emp (salary=200) \g
Query sent to backend is "replace emp (salary=200) "
REPLACE
Go
* retrieve (emp.all)\g
Query sent to backend is "retrieve (emp.all)"
---------------------------------------------------------
| name | office | phone | salary |
---------------------------------------------------------
| sidik | D-256 | (null) | 200 |
---------------------------------------------------------
| sudheer | D-255 | (null) | 200 |
---------------------------------------------------------
Go
* replace emp (name="ludhi") where emp.salary=200 \g
Query sent to backend is "replace emp (name="ludhi") where emp.salary=200 "
REPLACE
Go
* retrieve (emp.all)\g
Query sent to backend is "retrieve (emp.all)"
---------------------------------------------------------
| name | office | phone | salary |
---------------------------------------------------------
| ludhi | D-256 | (null) | 200 |
---------------------------------------------------------
| ludhi | D-255 | (null) | 200 |
---------------------------------------------------------
Go
* replace emp (salary=emp.salary*36) where emp.name="ludhi" \g
Query sent to backend is "replace emp (salary=emp.salary*36) where emp.name="ludhi" "
WARN:May 27 08:56:30:OperatorDef: no operator =
Go
* \q
I live to serve you.
Ra% exit
Ra%
script done on Wed May 27 08:56:40 1992
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: HELP !!!!!
1992-05-27 14:15 HELP !!!!! Ludhi Sidikpramana <lxs@philabs.Philips.Com>
@ 1992-05-27 08:26 ` mao@postgres.berkeley.edu
0 siblings, 0 replies; 17+ messages in thread
From: mao@postgres.berkeley.edu @ 1992-05-27 08:26 UTC (permalink / raw)
To: legacy
In message <9205271415.AA00542@postgres.Berkeley.EDU> you write:
> Query sent to backend is "retrieve (emp.all) "
> [ ... ]
> where name=char[], office=char[], phone=char[], salary=int4
>
> Postquel:
> ---------
> Problem: It seems that I cannot do strings comparison
> EG: retrieve (emp.office) where emp.name="ludhi" \g
use type char16 (sixteen-byte fixed-length char string) or text
(variable-length char string, up to 8Kbytes) rather than the
char[] type. no equality operator is defined between arrays
and strings.
mike olson
project sequoia 2000
uc berkeley
mao@cs.berkeley.edu
^ permalink raw reply [nested|flat] 17+ messages in thread
* HELP!!
@ 1992-06-23 13:17 Sudheer R. Vangati <sud@philabs.Philips.Com>
1992-06-23 08:20 ` Re: HELP!! mao@postgres.berkeley.edu
0 siblings, 1 reply; 17+ messages in thread
From: Sudheer R. Vangati @ 1992-06-23 13:17 UTC (permalink / raw)
To: legacy; +Cc: mummy!sud@uunet.UU.NET
Hi!
Is it possible to store a tuple to a variable and use that variable in
a retrieve command?
Example:
#define MAX_SIZE 512
char *buffer[MAX_SIZE];
buffer[i] = PQgetvalue(p, t+i, j);
/* buffer[i] now has (let's say) the tuple 'Word Processing'.*/
/* Is it possible to execute the following command and if not what is the alternative apart
from using the actual attribute value in PQexec.*/
PQexec ("retrieve portal Tportal (PROJECT.APPLICATION, PROJECT.VERSION,PROJECT.ARCHITECTURE, PROJECT.INSTALLER, PROJECT.VENDOR) where PROJECT.TYPE=\"buffer[i]\"");
I am not gettin any error , except that the value returned to PQntuplesGroup (a,k) is 0 which
is understandable because the retrieve command in PQexec is looking for "buffer[i]" in
the database and does not find it..
Any help is greatly appreciated.
Thanx in advance.
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: HELP!!
1992-06-23 13:17 HELP!! Sudheer R. Vangati <sud@philabs.Philips.Com>
@ 1992-06-23 08:20 ` mao@postgres.berkeley.edu
0 siblings, 0 replies; 17+ messages in thread
From: mao@postgres.berkeley.edu @ 1992-06-23 08:20 UTC (permalink / raw)
To: legacy
In message <9206231317.AA17935@postgres.Berkeley.EDU> you write:
> Is it possible to store a tuple to a variable and use that variable in
> a retrieve command?
sure. you should change your example to be
char *myresult, *qryres;
char myquery[512];
myresult = PQgetvalue(p, t+i, j);
/* myresult now has (let's say) the string 'Word Processing'.*/
sprintf(myquery, "retrieve (t.all) where t.name = \"%s\"", myresult);
qryres = PQexec(myquery);
mike olson
project sequoia 2000
uc berkeley
mao@cs.berkeley.edu
^ permalink raw reply [nested|flat] 17+ messages in thread
* help
@ 1992-08-17 09:21 Ingo Gringer <Ingo.Gringer@Informatik.TU-Chemnitz.DE>
0 siblings, 0 replies; 17+ messages in thread
From: Ingo Gringer @ 1992-08-17 09:21 UTC (permalink / raw)
To: legacy
Hi,
I've heard that there is a mailing list about any experience
with postgres. Please let me participate with this because I
will do any Postgres administration in the next time.
Thanks.
INgo
^ permalink raw reply [nested|flat] 17+ messages in thread
* HELP
@ 1992-11-22 22:57 kkaugars@NMSU.Edu
0 siblings, 0 replies; 17+ messages in thread
From: kkaugars@NMSU.Edu @ 1992-11-22 22:57 UTC (permalink / raw)
To: legacy
^ permalink raw reply [nested|flat] 17+ messages in thread
* Help
@ 1992-11-24 16:18 postgres@philabs.Philips.Com
1992-11-24 09:39 ` Re: Help mao@postgres.berkeley.edu
0 siblings, 1 reply; 17+ messages in thread
From: postgres@philabs.Philips.Com @ 1992-11-24 16:18 UTC (permalink / raw)
To: legacy
I have installed postgres version 4.0.1 on a sun sparc as per the
instructions given in the manual. But when I try to run postmaster in the
background it gives me the error
IpcMemoryAttach: shmat() failed: Permission denied
Any suggestions as to how to get around the problem??
Thanx in advance.
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: Help
1992-11-24 16:18 Help postgres@philabs.Philips.Com
@ 1992-11-24 09:39 ` mao@postgres.berkeley.edu
0 siblings, 0 replies; 17+ messages in thread
From: mao@postgres.berkeley.edu @ 1992-11-24 09:39 UTC (permalink / raw)
To: legacy
In message <9211241618.AA20222@postgres.Berkeley.EDU> you write:
> I have installed postgres version 4.0.1 on a sun sparc as per the
> instructions given in the manual. But when I try to run postmaster in the
> background it gives me the error
> IpcMemoryAttach: shmat() failed: Permission denied
>
> Any suggestions as to how to get around the problem??
you should do an ipcs to see what semaphores and shared memory segments
exist, and who owns them. the error you're seeing means that the
process is trying to attach shared memory it doesn't own.
if you can't remove the segments that are causing the problem, you can
start the postmaster up on a different tcp port (ie,
postmaster -p XXXX
where XXXX != 4321), and then do a setenv PGPORT XXXX for all the client
programs. the shared mem segment keys are computed from a hash on the
tcp port number.
mike
^ permalink raw reply [nested|flat] 17+ messages in thread
* HELP!!!
@ 1993-04-29 13:46 Sudheer R. Vangati <sud@philabs.Philips.Com>
0 siblings, 0 replies; 17+ messages in thread
From: Sudheer R. Vangati @ 1993-04-29 13:46 UTC (permalink / raw)
To: legacy
I just finished compiling version 4.1 on a SPARC
690MP running 4.1.2. Everything went fine and then
I run initdb and it did not give me any errors
either.
I then run postmaster and I get the following
message.
IpcMemoryAttach: shmat() failed: Permission denied
Any help as to why this happens and how to fix it
will be greatly appreciated.
Thanx.
^ permalink raw reply [nested|flat] 17+ messages in thread
* Help
@ 1993-06-07 20:28 WCA Pulford <pulford@expgb.esrf.fr>
0 siblings, 0 replies; 17+ messages in thread
From: WCA Pulford @ 1993-06-07 20:28 UTC (permalink / raw)
To: legacy
Hello whoever is reading this,
I am Bill Pulford of the Experiments Programming Group at the European
Synchrotron Radiation Facility at Grenoble in France. This is
currently by a large margin the most powerful facility of this sort in
the world. In September 1994 (and before in fact) we open our doors to
the scientific users of Europe and we have recognized the need for a
powerful and widespread database for a diverse set of applications.
These range from the archival of data to the management of users
proposals for experimental time.
While looking around we came upon POSTGRES and have been impressed by
its capabilities and its applicability to scientific research. We have
its compiled now for our two prevalent types of machine: HP700 under
HPUX V8.07 and 9 and SUN4 under SUNoS 4.1.3.
I have two requests:
1) Could you place me on any mailing list that you have.
2) We have so far been unable to bring a windows based application
into operation. We can work up to a point using Windows Development
tools such as Builder Accessory or HP Architect but it is relatively
hard work to interface this actually to the data. We have tried to put
PICASSO into operation but have so far failed. Can you give me any
advice or help.
--
---------------------------------------------
| WCA Pulford |
| |
| European Synchrotron Radiation Facility |
| Boite Postale 220 |
| F - 38043 Grenoble Cedex |
| France |
| |
| Tel.: +33 76.88.21.48 |
| pulford@esrf.esrf.fr |
---------------------------------------------
^ permalink raw reply [nested|flat] 17+ messages in thread
* HELP!
@ 1993-10-08 03:58 Venkatesan T Ramaswamy <venkat@math.luc.edu>
1993-10-08 16:38 ` Re: HELP! Oscar Linares M.D. <oscar@mail.msen.com>
0 siblings, 1 reply; 17+ messages in thread
From: Venkatesan T Ramaswamy @ 1993-10-08 03:58 UTC (permalink / raw)
To: legacy
Hi!
I installed POSTGRES yesterday and it was all fine.
I have installed it in the $HOME directory of the user named postgres.
Yesterday all the data files were moved to a new hard disk by our system administrator.
Today I get the following errors:
%createdb foo
FATAL 1:Oct 7 22:52:57:database template1 does not exist, bailing out...
/db/postgres/bin/createdb: database creation failed on foo.
%initdb
initdb: error: files not there
initdb: bmake install has not been run or you're trying to run initdb on a
initdb: machine that does not store the database (PGHOST doesn't work for this)
%ps
PID TT STAT TIME COMMAND
3267 pd IW 0:00 -csh (csh)
4075 q1 S 0:01 -csh (csh)
4694 q1 S 0:00 postmaster
4714 q1 R 0:00 ps
%pwd
/db/postgres/src
%echo $PGDATA
/db/postgres
Could you please tell me what is wrong?
Thank you,
Yours sincerely,
venkat
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: HELP!
1993-10-08 03:58 HELP! Venkatesan T Ramaswamy <venkat@math.luc.edu>
@ 1993-10-08 16:38 ` Oscar Linares M.D. <oscar@mail.msen.com>
0 siblings, 0 replies; 17+ messages in thread
From: Oscar Linares M.D. @ 1993-10-08 16:38 UTC (permalink / raw)
To: Venkatesan T Ramaswamy <venkat@math.luc.edu>; +Cc: legacy
On Thu, 7 Oct 1993, Venkatesan T Ramaswamy wrote:
> Hi!
>
> I installed POSTGRES yesterday and it was all fine.
>
> I have installed it in the $HOME directory of the user named postgres.
>
> Yesterday all the data files were moved to a new hard disk by our system administrator.
>
> Today I get the following errors:
>
>
> %createdb foo
> FATAL 1:Oct 7 22:52:57:database template1 does not exist, bailing out...
> /db/postgres/bin/createdb: database creation failed on foo.
> %initdb
> initdb: error: files not there
> initdb: bmake install has not been run or you're trying to run initdb on a
> initdb: machine that does not store the database (PGHOST doesn't work for this)
> %ps
> PID TT STAT TIME COMMAND
> 3267 pd IW 0:00 -csh (csh)
> 4075 q1 S 0:01 -csh (csh)
> 4694 q1 S 0:00 postmaster
> 4714 q1 R 0:00 ps
> %pwd
> /db/postgres/src
> %echo $PGDATA
> /db/postgres
>
>
>
>
> Could you please tell me what is wrong?
>
> Thank you,
>
> Yours sincerely,
> venkat
This really is a problem! As you know, when you did all your set-up work,
a directory "Data" was created in your $HOME/postgress. When you initdb,
you get a working system there with your pg_database, pg_usr, pg_defaults,
etc... It is a problem because your initdb information stores alot of
important information in that directory. Now, you move the data files, but
your set-up files are looking for it where they were originally.
You will find this info in the documentation, also, it warns against this
type of thing (moving things around on the system).
I suggest you create a link from your "Data" directory to where your sa
moved the data files ( the easiest solution).
e.g., ln -s /where/sa/put/data $HOME/postgress/Data
Good luck and don't despair,
OAL
^ permalink raw reply [nested|flat] 17+ messages in thread
* help
@ 1993-11-12 14:08 Ranen Goren <ranen@cs.huji.ac.il>
0 siblings, 0 replies; 17+ messages in thread
From: Ranen Goren @ 1993-11-12 14:08 UTC (permalink / raw)
To: legacy
^ permalink raw reply [nested|flat] 17+ messages in thread
* help
@ 1994-02-18 06:39 Chu Duong <chud@van.oz.au>
0 siblings, 0 replies; 17+ messages in thread
From: Chu Duong @ 1994-02-18 06:39 UTC (permalink / raw)
To: legacy
Chu Duong
(chud@van.oz.au)
^ permalink raw reply [nested|flat] 17+ messages in thread
* HELP
@ 1994-04-13 18:07 Shayne Smith (rastus) <rastus!snsmith@brisnethub1.brisnet.org.au>
0 siblings, 0 replies; 17+ messages in thread
From: Shayne Smith (rastus) @ 1994-04-13 18:07 UTC (permalink / raw)
To: rastus!postgres.Berkeley.EDU!postgres@brisnethub1.brisnet.org.au
HELP
--
| Shayne Smith Ph +61 7 800 8937 . DRAGON Corporate Services |
| snsmith@rastus.brisnet.org.au _-_|\ Ingres DBA / Unix systems prog. |
|------------------------------- / * ---------------------------------|
| GPO Box 1322, Sunnybank Hills \_.-__/ #include <disclaimer.h> |
| Qld, AUSTRALIA 4109 v #include <linux.h> |
^ permalink raw reply [nested|flat] 17+ messages in thread
* Help
@ 1994-04-28 12:47 David Brown - Computer Centre <dab@computer-science.paisley.ac.uk>
1994-04-28 19:11 ` Re: Help Paul M. Aoki <aoki@postgres.Berkeley.EDU>
0 siblings, 1 reply; 17+ messages in thread
From: David Brown - Computer Centre @ 1994-04-28 12:47 UTC (permalink / raw)
To: legacy
Hi,
I wonder if anyone can help me fast. Trying to compile a C program that
interacts with postgres nad receive the following :
diana30> !cc
cc overpaid_2.c -I. -I/diana30g/postgres/include -I/diana30g/postgres/src/backend -I/diana30g/postgres/include/port/sparc -L/diana30g/postgres/lib -lpq
ld: Undefined symbol
_GetAttributeByName
any ideas!!!!!
cheers dav
**********************************************
* P A I S L E Y U N I V E R S I T Y *
**********************************************
*
* David Brown
* Analyst/Programmer
* Computer Centre ( User Support )
* Paisley University
* High Street
* Paisley
* Renfrewshire
* PA1 2BE
* voice (041-848-3714)
* fax (041-887-0812)
***********************************************
.\
===============================================================================
To add/remove yourself from the POSTGRES mailing list: send mail with
the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"
If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
a human will deal with it. DO NOT post to the "postgres" mailing list.
===============================================================================
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: Help
1994-04-28 12:47 Help David Brown - Computer Centre <dab@computer-science.paisley.ac.uk>
@ 1994-04-28 19:11 ` Paul M. Aoki <aoki@postgres.Berkeley.EDU>
0 siblings, 0 replies; 17+ messages in thread
From: Paul M. Aoki @ 1994-04-28 19:11 UTC (permalink / raw)
To: David Brown - Computer Centre <dab@computer-science.paisley.ac.uk>; +Cc: legacy
David Brown - Computer Centre <dab@computer-science.paisley.ac.uk> writes:
> cc overpaid_2.c -I. -I/diana30g/postgres/include -I/diana30g/postgres/src/bac
kend -I/diana30g/postgres/include/port/sparc -L/diana30g/postgres/lib -lpq
> ld: Undefined symbol
> _GetAttributeByName
you don't need GetAttributeByName for frontend functions -- the
interface for that is part of libpq. unfortunately there are no
examples in the user manual on how to use libpq, you just have to
slog through the rather non-tutorial discussion in the ref manual
and look at src/contrib and src/bin for examples.
GetAttributeByName is a hack to provide a tuple interface for
functions that are loaded in the backend server and need to
work on one tuple at a time. if you are trying to load this into
the backend, you don't want -lpq and you do want -c in there
somewhere. you also need to create a shared object in accordance
with the user manual.
--
Paul M. Aoki | CS Div., Dept. of EECS, UCB | aoki@postgres.Berkeley.EDU
| Berkeley, CA 94720 | ...!uunet!ucbvax!aoki
===============================================================================
To add/remove yourself from the POSTGRES mailing list: send mail with
the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"
If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
a human will deal with it. DO NOT post to the "postgres" mailing list.
===============================================================================
^ permalink raw reply [nested|flat] 17+ messages in thread
end of thread, other threads:[~1994-04-28 19:11 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1992-05-27 14:15 HELP !!!!! Ludhi Sidikpramana <lxs@philabs.Philips.Com>
1992-05-27 08:26 ` mao@postgres.berkeley.edu
1992-06-23 13:17 HELP!! Sudheer R. Vangati <sud@philabs.Philips.Com>
1992-06-23 08:20 ` Re: HELP!! mao@postgres.berkeley.edu
1992-08-17 09:21 help Ingo Gringer <Ingo.Gringer@Informatik.TU-Chemnitz.DE>
1992-11-22 22:57 HELP kkaugars@NMSU.Edu
1992-11-24 16:18 Help postgres@philabs.Philips.Com
1992-11-24 09:39 ` Re: Help mao@postgres.berkeley.edu
1993-04-29 13:46 HELP!!! Sudheer R. Vangati <sud@philabs.Philips.Com>
1993-06-07 20:28 Help WCA Pulford <pulford@expgb.esrf.fr>
1993-10-08 03:58 HELP! Venkatesan T Ramaswamy <venkat@math.luc.edu>
1993-10-08 16:38 ` Re: HELP! Oscar Linares M.D. <oscar@mail.msen.com>
1993-11-12 14:08 help Ranen Goren <ranen@cs.huji.ac.il>
1994-02-18 06:39 help Chu Duong <chud@van.oz.au>
1994-04-13 18:07 HELP Shayne Smith (rastus) <rastus!snsmith@brisnethub1.brisnet.org.au>
1994-04-28 12:47 Help David Brown - Computer Centre <dab@computer-science.paisley.ac.uk>
1994-04-28 19:11 ` Re: Help Paul M. Aoki <aoki@postgres.Berkeley.EDU>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox