Re: [GENERAL] Triggers: options besides compiled code?

1998-07-09 Thread Brian

On 9 Jul 1998, Roland Roberts wrote:

> I started to look at the triggers documentation and was immediately
> dismayed to discover that I would have compile code to create a
> trigger.  I have been using the old "rules" mechanism to automatically
> put a sequence number into a tuple when inserting new rows.  Are my
> choices limited to just (1) compiled code, and (2) the old rules
> mechanism?

if you insert a new row, isn't the sequence automatically inserted?



> 
> roland
> -- 
> Roland B. Roberts
> [EMAIL PROTECTED]
> 
> 

/-- [EMAIL PROTECTED] -\
| Brian Feeny| USR TC Hubs | ShreveNet Inc. (318)222-2638  |
| Network Administrator  | Perl, Linux | Web hosting, online stores,   |
| ShreveNet Inc. |  USR Pilot  | Dial-Up 14.4-56k, ISDN & LANs |
| 89 CRX DX w/MPFI, lots of  |-=*:Quake:*=-| http://www.shreve.net/|
| mods/Homepage coming soon  |LordSignal/SN| Quake server: 208.206.76.47   |
\-- 318-222-2638 x109 -/





[GENERAL] Mirror- unix.wizard.ca

1998-07-09 Thread Anil Amarakoon

Hi!

The links that does not work on Canadian Mirror.

Anil

http://unix.wizard.ca/postgres/software/
gets directory Listing

http://unix.wizard.ca/postgres/software/Overview.shtml - search All
categories returns
if you do not enter anything on the text boxes
File Not Found
The requested URL /cgi/gen_srch.cgi was not found on this
server.

http://unix.wizard.ca/postgres/cd-dist.shtml - no gifs on the  page

Link->Reference Manual<- on http://unix.wizard.ca/postgres/docs/
File Not Found
The requested URL /postgres/docs/postgres/p05.htm was not
found on this server.

Link->Developer's Guide<- on http://unix.wizard.ca/postgres/docs/
File Not Found
The requested URL /postgres/docs/postgres/p06.htm was not
found on this server.

Link-> Appendices.<- on http://unix.wizard.ca/postgres/docs/
File Not Found
The requested URL /postgres/docs/postgres/p07.htm was not
found on this server.





Re: [GENERAL] postgresql website

1998-07-09 Thread The Hermit Hacker

On Wed, 8 Jul 1998, The Web Administrator wrote:

> Well, humour me for a second.. I am just setting up a Canadian Mirror.. So
> far most of the links seem to keep working, and the rest of the links
> actually take you to the main postgres site..(For the message search's etc.)
> 
> Check to see if you find any links not working, and let me know :>  Saves me
> the work..
> I THINK I checked em all...

Actually, in defence of Oliver, the example he did point out was
valid...the third party page uses features that I have on my server, but
are not necessarily available on others (namely, PHP/FI) ... I've hard
coded that link back again...

 > > Oliver Mueschke wrote:
> 
> > hi there,
> >
> > frankly i would say that the mirrored postgresql website is the best
> > reason to avoid postgresql. (i tested the german and the uk sites.) most
> > of the links don't work at all or show "interesting" error messages. all
> > this would be of minor interest if there was a way to access the main
> > (and working?) postgresql url.
> >
> > regards
> > oliver
> >
> > ps: i use postgresql since 6.2.1 and i really do like it.
> >
> > --- example output of third party and examples search engine -
> >
> > Based on PostgreSQL v6.0, this page uses the C API for the search
> > engine, as well as the insertion screen, and PHP/FI for the detail
> > screens for each of the records.
> >
> > The engine is currently under construction so there would be errors
> > specifically when clicking on the more link in the generated list
> >
> >  0 total hits since Wednesday July 8. 0 hits today.
> >  No Previous Access to this page
> >  Page was last updated on Thursday
> >  December 25, 1997 at 8:44:00
> >  Overview.phtml: dbmopen: 3 [File open error],
> >  13 [Permission denied] on line 84
> >
> >  Overview.phtml: Unable to create
> >
> > /var/log/apache/1000/mirrors_postgres95_html_software_Overview.phtml.log
> >  on line 84
> > -
> 
> 
> 
> --
> ++
> 
> Michael - System Administrator  Working in Cheap Canadian
> Dollars
> Unix Administration - WebSite Hosting - Network Services - Programming
> Wizard Internet Services - TechnoWizard Computers - Wizard Tower
> TechnoServices
> --
> 
> (604) 589-0037  Beautiful British Columbia, Canada
> ++
> 
> 
> 

Marc G. Fournier
Systems Administrator @ hub.org 
primary: [EMAIL PROTECTED]   secondary: scrappy@{freebsd|postgresql}.org 




Re: [GENERAL] translate "bug"?

1998-07-09 Thread Bruce Momjian

> Yeah, I've rethough about it and it does seem a bit out-there ;) ... I'm
> sure there was one time where I encountered a situation where you would
> want to use the \d? commands in an SQL statement environment but I can't
> even begin to remember... so maybe it wasn't that important afterall and
> regex'ing will do just fine.
> 
> I do feel though that the \df  functionality would be useful in
> other catalog queries (thank james, I didn't know that what they were
> called) e.g. \do  or \dt  (which would get you all tables
> containing  e.g. titles, tileauthors, titleditors etc, as opposed to
> \d titles which would get you just table titles).
> 
> or am I being dim again? [that dreaded feeling of posting something really
> stupid...]

I think these are good ideas.  I will implement them for 6.4.  Glad you
are using the new features.

-- 
Bruce Momjian  |  830 Blythe Avenue
[EMAIL PROTECTED]  |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive, |  (610) 353-9879(w)
  +  Christ can be your backup.|  (610) 853-3000(h)



[GENERAL] Re: [INTERFACES] pb compiling JDBC interface

1998-07-09 Thread Peter T Mount

On Wed, 8 Jul 1998, Cyril Ferrand wrote:

>   Thanks for your answer but I find the Pb it was a bad version of JDK (1.0.2) 
> now I have installed the 1.1.3 and there is no error.

Ah yes, JDBC was quite different for 1.0.2...

> But now I have a pb with exeample, because I don't understand what to to put 
> as user and passwd ...

Postgresql manages it's own users and passwords (it doesn't use any unix
accounts apart from the DBA [usually 'postgres']). The CREATE USER, ALTER
USER and DROP USER sql statements do this.

In JDBC, you need to supply the user & password that postgres understands.

> -- 
> *
> * Cyril Ferrand : mailto:[EMAIL PROTECTED]*
> *http://www.mygale.org/05/ironmask  *
> *
> 

-- 
Peter T Mount [EMAIL PROTECTED] or [EMAIL PROTECTED]
Main Homepage: http://www.retep.org.uk
 Someday I may rebuild this signature completely ;-) 
Work Homepage: http://www.maidstone.gov.uk Work EMail: [EMAIL PROTECTED]




Re: [GENERAL] How to rename a database?

1998-07-09 Thread Aleksey Dashevsky

Use following syntax:
alter table  rename to 

Al.

On Wed, 8 Jul 1998, Farzad FARID wrote:

> 
> How do I rename an existing database? Is it enough to just rename the
> directory? If that's the only way to do it do I have to first shut the
> server down?
> 
> --
> Farzad FARID
> Administrateur Reseau
> Publicis Technology
> 
> 




[GENERAL] Python

1998-07-09 Thread Konstantin S. Kuznetsov

Hello!
I have PostgreSQL-6.3.2 and Python1.5 with RedHat-5.1 distribution.
But I can't connect PostgreSQL from Python script, cause there are no
pg.py (or smth like that) module installed.
Can anyone have experience with using such modules?
Thank you.




Re: [GENERAL] postgresql website

1998-07-09 Thread Oliver Mueschke

hi,

after the third party stuff being available via the german mirror i
noticed that the at least 4 or 5 of the 57 third party entries are junk.
the image buttons "Prev" and "Next" (to navigate the search result) are
shown w/o images.

the links to the html mirrorsites in poland and germany (embedded in
http://www.itm.tu-clausthal.de/mirrors/postgres95/html/sites.shtml) both
give directory listings of the mirroring hosts.

oliver



Re: [GENERAL] more nodeError problems and general view failures!

1998-07-09 Thread Bruce Momjian

> brecard=> create view on_test2 as
> brecard-> select in_words,number,number * number as "number squared" from
> test1;

Here is the cause.  The code could not handle an AS with multiple
words, because of the way it was stored in the rewrite system.  This
patch should fix the problem.

Does it fix your second problem too?

---

? src/Makefile.custom
? src/config.log
? src/Makefile.in
? src/config.cache
? src/config.status
? src/GNUmakefile
? src/log
? src/regress.out
? src/Makefile.global
? src/backend/fmgr.h
? src/backend/parse.h
? src/backend/postgres
? src/backend/global1.bki.source
? src/backend/local1_template1.bki.source
? src/backend/global1.description
? src/backend/local1_template1.description
? src/backend/bootstrap/bootparse.c
? src/backend/bootstrap/bootstrap_tokens.h
? src/backend/bootstrap/bootscanner.c
? src/backend/catalog/global1.bki.source
? src/backend/catalog/global1.description
? src/backend/catalog/local1_template1.bki.source
? src/backend/catalog/local1_template1.description
? src/backend/port/Makefile
? src/backend/postmaster/_xlk
? src/backend/utils/Gen_fmgrtab.sh
? src/backend/utils/fmgr.h
? src/backend/utils/fmgrtab.c
? src/bin/cleardbdir/cleardbdir
? src/bin/createdb/createdb
? src/bin/createuser/createuser
? src/bin/destroydb/destroydb
? src/bin/destroyuser/destroyuser
? src/bin/initlocation/initlocation
? src/bin/ipcclean/ipcclean
? src/bin/pg_dump/Makefile
? src/bin/pg_dump/pg_dump
? src/bin/pg_id/pg_id
? src/bin/pg_passwd/pg_passwd
? src/bin/pg_version/Makefile
? src/bin/pg_version/pg_version
? src/bin/pgtclsh/pgtclsh
? src/bin/pgtclsh/pgtksh
? src/bin/psql/Makefile
? src/bin/psql/psql
? src/include/version.h
? src/include/config.h
? src/include/blocksize.h
? src/interfaces/ecpg/lib/Makefile
? src/interfaces/libpgtcl/Makefile
? src/interfaces/libpq/Makefile
? src/interfaces/libpq/libpq.so.1.1
? src/interfaces/libpq/c.h
? src/lextest/lex.yy.c
? src/lextest/lextest
? src/test/regress/regression.diffs
? src/tools/backend/flow.ps
Index: src/backend/nodes/outfuncs.c
===
RCS file: /usr/local/cvsroot/pgsql/src/backend/nodes/outfuncs.c,v
retrieving revision 1.36
diff -c -r1.36 outfuncs.c
*** outfuncs.c  1998/06/15 19:28:32 1.36
--- outfuncs.c  1998/07/09 14:48:58
***
*** 660,666 
sprintf(buf, " :restypmod %d ", node->restypmod);
appendStringInfo(str, buf);
appendStringInfo(str, " :resname ");
!   appendStringInfo(str, node->resname);
sprintf(buf, " :reskey %d ", node->reskey);
appendStringInfo(str, buf);
sprintf(buf, " :reskeyop %u ", node->reskeyop);
--- 660,667 
sprintf(buf, " :restypmod %d ", node->restypmod);
appendStringInfo(str, buf);
appendStringInfo(str, " :resname ");
!   sprintf(buf,"\"%s\"", node->resname); /* fix for SELECT col AS "my name" */
!   appendStringInfo(str, buf);
sprintf(buf, " :reskey %d ", node->reskey);
appendStringInfo(str, buf);
sprintf(buf, " :reskeyop %u ", node->reskeyop);
***
*** 849,855 
appendStringInfo(str, " :arraylow ");
for (i = 0; i < node->arrayndim; i++)
{
!   sprintf(buf, "  %d ", node->arraylow.indx[i]);
appendStringInfo(str, buf);
}
appendStringInfo(str, " :arrayhigh ");
--- 850,856 
appendStringInfo(str, " :arraylow ");
for (i = 0; i < node->arrayndim; i++)
{
!   sprintf(buf, " %d ", node->arraylow.indx[i]);
appendStringInfo(str, buf);
}
appendStringInfo(str, " :arrayhigh ");

-- 
Bruce Momjian  |  830 Blythe Avenue
[EMAIL PROTECTED]  |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive, |  (610) 353-9879(w)
  +  Christ can be your backup.|  (610) 853-3000(h)



Re: [GENERAL] more nodeError problems and general view failures!

1998-07-09 Thread Stuart Rison

Erm, dunce question (sorry)

How do I apply that patch?  Do I cut and paste from ? src/Makefile.custom
down into a file and then use patch?

And -more scarily- does that mean I have to recompile postgres?

That aside, thanks for your help Bruce, as soon I figure out how to apply
the patch I'll let you know if it worked!

Cheers, [indeed huge grin... I'm off to Silverstone for the British F1
Grand Prix!!]

Stuart.

PS.  BTW, I'll never understand the C behind it but, conceptually speaking,
why does creating the view with the space in it and then select from it
yield the error but just doing the query 'select in_words,number,number *
number as "number squared" from test1;' work?

>> brecard=> create view on_test2 as
>> brecard-> select in_words,number,number * number as "number squared" from
>> test1;
>
>Here is the cause.  The code could not handle an AS with multiple
>words, because of the way it was stored in the rewrite system.  This
>patch should fix the problem.
>
>Does it fix your second problem too?
>

>? src/Makefile.custom
>...patch follows...

+-+--+
| Stuart Rison| Ludwig Institute for Cancer Research |
| Tel. (0171) 878 4041| Courtauld Building   |
| Fax. (0171) 878 4040| 91 Riding House Street   |
+-+ London, W1P 8BT  |
| [EMAIL PROTECTED] | UNITED KINGDOM.  |
+-+--+





[GENERAL] Triggers: options besides compiled code?

1998-07-09 Thread Roland Roberts

I started to look at the triggers documentation and was immediately
dismayed to discover that I would have compile code to create a
trigger.  I have been using the old "rules" mechanism to automatically
put a sequence number into a tuple when inserting new rows.  Are my
choices limited to just (1) compiled code, and (2) the old rules
mechanism?

roland
-- 
Roland B. Roberts
[EMAIL PROTECTED]




Re: [GENERAL] How to rename a database?

1998-07-09 Thread James Olin Oden


> Use following syntax:
> alter table  rename to 
>
>

I don't think that will work for the entire database.  Remember a table is
part of the database.  So I don't think alter will change the actual
database's name...

> >
> > How do I rename an existing database? Is it enough to just rename the
> > directory? If that's the only way to do it do I have to first shut the
> > server down?
> >
> > --
> > Farzad FARID
> > Administrateur Reseau
> > Publicis Technology
> >
> >






Re: [GENERAL] postgresql website

1998-07-09 Thread The Web Administrator

Well, humour me for a second.. I am just setting up a Canadian Mirror.. So
far most of the links seem to keep working, and the rest of the links
actually take you to the main postgres site..(For the message search's etc.)

Check to see if you find any links not working, and let me know :>  Saves me
the work..
I THINK I checked em all...

Oliver Mueschke wrote:

> hi there,
>
> frankly i would say that the mirrored postgresql website is the best
> reason to avoid postgresql. (i tested the german and the uk sites.) most
> of the links don't work at all or show "interesting" error messages. all
> this would be of minor interest if there was a way to access the main
> (and working?) postgresql url.
>
> regards
> oliver
>
> ps: i use postgresql since 6.2.1 and i really do like it.
>
> --- example output of third party and examples search engine -
>
> Based on PostgreSQL v6.0, this page uses the C API for the search
> engine, as well as the insertion screen, and PHP/FI for the detail
> screens for each of the records.
>
> The engine is currently under construction so there would be errors
> specifically when clicking on the more link in the generated list
>
>  0 total hits since Wednesday July 8. 0 hits today.
>  No Previous Access to this page
>  Page was last updated on Thursday
>  December 25, 1997 at 8:44:00
>  Overview.phtml: dbmopen: 3 [File open error],
>  13 [Permission denied] on line 84
>
>  Overview.phtml: Unable to create
>
> /var/log/apache/1000/mirrors_postgres95_html_software_Overview.phtml.log
>  on line 84
> -



--
++

Michael - System Administrator  Working in Cheap Canadian
Dollars
Unix Administration - WebSite Hosting - Network Services - Programming
Wizard Internet Services - TechnoWizard Computers - Wizard Tower
TechnoServices
--

(604) 589-0037  Beautiful British Columbia, Canada
++