Re: [GENERAL] How to display user-defined functions?

1999-09-01 Thread José Soares
Your functions are stored in the table pg_proc. If you want to display the text of a function, try this: select PROSRC from pg_proc where proname = 'your_function_name'; José Teodor Cimpoesu ha scritto: > Mark Dalphin wrote: > > > > Hi, > > > > Is there a way to display user-defined functions

Re: [GENERAL] Referential integrity

1999-08-31 Thread José Soares
Try using triggers: (see attached example) José Pablo Sentis ha scritto: >Part 1.1Type: Plain Text (text/plain) >Encoding: quoted-printable --Referential integrity: --1. Don't allow to add a detail without header --2. Delete all details in cascade if one decide to delete t

Re: [GENERAL] Tr: DUMP database for sample

1999-08-10 Thread José Soares
--Referential integrity: --1. Don't allow to add a detail without header --2. Delete all details in cascade if one decide to delete the header --3. Update details' key in cascade if header's key is changed DROP TABLE header; CREATE TABLE header (     year    INTEGER NOT NULL,

Re: [GENERAL] int8-datatype: possible bug

1999-05-07 Thread José Soares
d to run on your machine, and I will fold those into this standard distribution. -- Jelle Ruttenberg ha scritto: > Hello José Soares, > > thank you. I tried your testcase and all input was changed in the mag

Re: [GENERAL] int8-datatype: possible bug

1999-05-07 Thread José Soares
Jelle Ruttenberg ha scritto: Hello all, when I try to put a numeric 'timestamp' like 19980528112607 into an int8-datatype I get the notice 'NOTICE:  Integer input '19980528112607' is out of range; promoted to float' and the value is put in the database as 9223091508918288644. It doesn't matter if

Re: [GENERAL] index on an int8 column

1999-05-05 Thread José Soares
It works on 6.5beta1. Sarah Officer ha scritto: > I have a table with a column of type int8. When I try to create an > index on it, the > database protests and gives the following error message: > > ERROR: Can't find a default operator class for type 20. > > Is there an easy fix for this?

Re: [GENERAL] LIMIT QUESTION

1999-04-29 Thread José Soares
Martin Wong ha scritto: > Sorry for the previous posting. The following worked. > > BTW, this affects just this database or throughout the entire postgresql > server? > Only current_session; > > And, how does one reset this variable to max? > RESET QUERY_LIMIT; ___

Re: [GENERAL] PL/pgSQL

1999-04-27 Thread José Soares
Andy Lewis ha scritto: > How does one compile or add PL/pgSQL if it doesn't already exist? > > I've searched the DOCS and mailing list and the best that I can come up > with is an enable script that complains about the missing .sql file. > > I'm running 6.4.2 cd postgresql-v6.4.2/src/pl/plpgsq

Re: [GENERAL] Object-oriented stuff and postgres

1999-04-21 Thread José Soares
--retrieve column information...     SELECT a.attnum, a.attname, t.typname, a.attlen,     a.atttypmod, a.attnotnull, a.atthasdef     FROM pg_class c, pg_attribute a, pg_type t     WHERE c.relname = 'comuni'     and a.attnum > 0     and a.attrelid = c.oid   

Re: [GENERAL] Re: [HACKERS] Gregorian Calendar

1999-04-14 Thread José Soares
Hi Thomas, Thomas Lockhart ha scritto: > > I have a question about dates. > > The Gregorian reform of calendar skiped 10 days on Oct, 1582. > > This reform was accepted by Great Britain and Dominions (including > > what is now the USA) only in 1752. > > If I insert a date that doesn't exist Post

[GENERAL] Gregorian Calendar

1999-04-12 Thread José Soares
Hi all, I have a question about dates. The Gregorian reform of calendar skiped 10 days on Oct, 1582. This reform was accepted by Great Britain and Dominions (including what is now the USA) only in 1752. This is way we have Sep, 1752 like this: $ cal 9 1752 September 1752 S M Tu W Th F S

[GENERAL] leap day bug after 1901

1999-04-12 Thread José Soares
Hi all, Seems that PostgreSQL checks for leap day only before 1902. prova=> select date '0001-02-29'; ERROR: date_in: day must be limited to values 1 through 28 in '0001-02-29' prova=> select date '1701-02-29'; ERROR: date_in: day must be limited to values 1 through 28 in '1701-02-29' prova=