TRIGGER inheritance?

2000-03-13 Thread Ian Harder
I'm using PGSQL 7 to create a new database, and would like to track timestamps and user names for record insertions and updates. Rather than declare the fields for each table, I've created a 'base' table that will be inherited by all others. Here is a simplified example: CREATE TABLE base (

Re: [GENERAL] Index pg_proc_prosrc_index: NUMBER OF INDEX' TUPLES (1071)ISNOT THE SAME AS HEAP' (1070)

2000-03-13 Thread Tatsuo Ishii
> I'm a bit late with my reaction but I've seen the message below on a Cobalt > system (kernel 2.0.34) with > postgresql 6.5.3. > > The problem could be reproduced (the entire /var/lib/pgsql dir would be > replaced after every crash). > A PHP3 script revoking user rights on many tables and ending

Re: [GENERAL] Max Length for VARCHAR?

2000-03-13 Thread Chris Gokey
Hi Jan, We had something similiar to this in the past. The entire text was broken down into lines (80 characters each) and stored as individual rows in a table. The problem with this approach was that you can't search for phrases that span rows, so I'd like to be able to store the entire text i

RE: [GENERAL] PSQL Problem

2000-03-13 Thread Tomas TPS Ulej
> On Sun, Mar 12, 2000 at 04:52:15PM +0100, Tomas TPS Ulej wrote: > > root@[master /usr/ports/databases/p5-DBI] # psql setup > > Connection to database 'setup' failed. > > connectDB() -- connect() failed: No such file or directory > > Is the postmaster running at 'localhost' and accepting > connec

Re: [GENERAL] Index pg_proc_prosrc_index: NUMBER OF INDEX' TUPLES (1071)ISNOT THE SAME AS HEAP' (1070)

2000-03-13 Thread Wim Aarts
I'm a bit late with my reaction but I've seen the message below on a Cobalt system (kernel 2.0.34) with postgresql 6.5.3. The problem could be reproduced (the entire /var/lib/pgsql dir would be replaced after every crash). A PHP3 script revoking user rights on many tables and ending with a vacuum

RE: [GENERAL] Date problem

2000-03-13 Thread JT Kirkpatrick
can also use the current_date function: select (current_date)+3; jt -Original Message- From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] Sent: Monday, March 13, 2000 9:34 AM To: edNET System Admin Cc: [EMAIL PROTECTED] Subject:Re: [GENERAL] Date problem i'm not sure

RE: [GENERAL] Max Length for VARCHAR?

2000-03-13 Thread JT Kirkpatrick
i'm kind'a jumping in here, after being gone for a week and reading my emails from the bottom up. . . just fyi, in our application we needed a field to record internal notes. we are a call center tracking service calls on computers of all things. . . these internal notes are recorded by our

Re: [GENERAL] alter table

2000-03-13 Thread Jose Soares
It works for me in v7beta: hygea1=# create table tmp ( idhygea1(# id int, hygea1(# first text); CREATE hygea1=# insert into tmp values(1,'one'); INSERT 120138 1 hygea1=# alter table tmp add column last text; ALTER hygea1=# update tmp set last=''; UPDATE 1 hygea1=# insert into tmp values(2,'two','

Re: [GENERAL] Max Length for VARCHAR?

2000-03-13 Thread Jose Soares
It seems to be 8104: prova=> create table a (a varchar(9)); ERROR: length for type 'varchar' cannot exceed 8104 Chris Gokey wrote: > Hi everyone, > > What is the maximum length of VARCHAR? If there something equivalent > to Oracle's LONG in postgresql? I need a datatype that can hold ve

Re: [GENERAL] Date problem

2000-03-13 Thread kaiq
that is the problem: you got to use select, otherwise, nothing to do with PG. if you really mean to ask perl to do it, there is a very powerful module (like PG's datetime feature) in perl (search CPAN by date)--I almost used it, but since PG is so good at datetime (timestamp/interval), I'm lazy.

Re: [GENERAL] Date problem

2000-03-13 Thread Jose Soares
Try using standard sql: hygea=# select current_date + interval '3 days';     ?column?  2000-03-16 00:00:00+01     edNET System Admin wrote: Hi, I'm trying to do something with dates which is proving to be a bit tricky. I'm trying to get the current "date" and add 3 da

Re: [GENERAL] Max Length for VARCHAR?

2000-03-13 Thread Peter Eisentraut
Paul Dlug writes: > I would say as good judge, if you know for certain it will not exceed a > length, use varchar(). But if there is a doubt just use TEXT rather than > setting varchar() to a high value. SQL doesn't seem to allow for a character type of infinite length which is why we have text,

Re: [GENERAL] jdbc access

2000-03-13 Thread Peter Eisentraut
Chris Gokey writes: > I am trying to connect via JDBC to the database. The database requires > authentification in the form of userid/password. Using psql, I > typed CREATE USER XXX IDENTIFIED BY YYY. But, the postmaster is till denying > access to the database. How do I create userid/passwo

Re: [GENERAL] jdbc access

2000-03-13 Thread Peter Eisentraut
Chris Gokey writes: > Funny though, I can't figure out what the purpose of CREATE USER from > the psql prompt is used for anymore? It seems all user creation is done > from the unix prompt. Actually createuser is a script that essentially calls psql -c "CREATE USER ...". -- Peter Eisentrau

Re: [GENERAL] Date problem

2000-03-13 Thread hikmat
i'm not sure about perl but a way to do it i psql: select (now()+'3 days') from anytable; Thu 16 Mar 15:34:12 2000 i did it today(monday) On Sun, 12 Mar 2000, edNET System Admin wrote: > Hi, I'm trying to do something with dates which is proving to be a bit > tricky. > > I'm trying to get

[GENERAL] How to unsubscribe from mailing list?

2000-03-13 Thread jsahn
Hi.. I subscribed to the pgsql digest mailing list. After crash, I send mail to [EMAIL PROTECTED] with the following body: set pgsql-general digest [EMAIL PROTECTED] then I got the following message: Settings for <[EMAIL PROTECTED]> changed. SPR 1 valid command processed; it was successful a

[GENERAL] Cannot find attribute of relation...

2000-03-13 Thread Paulo Jan
Hi all: The error: "cannot find attribute 3 of relation [table name]" What does it usually mean? How can one fix it, aside of dumping the table and creating it again? If the above is solved with RTFM, can anybody give some pointers? Tha

[Fwd: [GENERAL] Re: alter table]

2000-03-13 Thread Holger Klawitter
Holger Klawitter wrote: > > Raigo Lukk wrote: > > > > Hi > > > > > > > alter table tmp add column last text; > > > > I had this same problem, turned out that PostgreSQL don't have > > this feature :-( > > > > So only way is: > > DROP TABLE and then again CREATE TABLE with all the fields > > you

Re: [GENERAL] stored procedure

2000-03-13 Thread Holger Klawitter
Raigo Lukk wrote: > > Hi > > I can't find CREATE PROCEDURE in the guides. Try CREATE FUNCTION > What is the way of creating stored procedures in PostgreSQL? See above. You might also want to read Appendix II 42. dealing with additional languages. Reagrds, Holger Klawitter -- Holger K

[GENERAL] set digest

2000-03-13 Thread i_a
Groetjes/Greetinx, Ger -- Ger Hobbelt a.k.a. Insh_Allah mailto:[EMAIL PROTECTED] -- ###I feel the Need, the Need for