Re: [BUGS] abnormal behaviour of a CHECK CONSTRAINT with a regular
> Correct. It is annoying in some cases, but if the input to the trigger > isn't of the column datatype, then what type is it? It's hard to see > how that could work in general. > > If you want, say, a varchar length constraint to be checked only after > the trigger runs, I'd counsel declaring the column as plain text and > writing the length test as a CHECK constraint. I had just an example, where it would have been convenient, if one could change the type. Let's say you want to give the users the possibility to enter incomplete dates (year, year&month or the complete date). Indeed you could not insert this information as it is. But later on for stats you would like to be able to treat the column as a date. I have implemented it by storing the user information in a varchar column and inserting the whole date in another column. (if the user only provides the year, the date is inserted as 16.05.year,...). Kind regards, Daniel Struck -- Retrovirology Laboratory Luxembourg Centre Hospitalier de Luxembourg 4, rue E. Barblé L-1210 Luxembourg phone: +352-44116105 fax: +352-44116113 web: http://www.retrovirology.lu e-mail: [EMAIL PROTECTED] ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
[BUGS] BUG #1078: Ref #1045 hostname lookup does not work
The following bug has been logged online: Bug reference: 1078 Logged by: Josh Rovero Email address: [EMAIL PROTECTED] PostgreSQL version: 7.4 Operating system: HP-UX 11.11 Description:Ref #1045 hostname lookup does not work Details: Box configured with /etc/hosts, NIS and DNS. Primary source for IPs on local network is NIS, and works. But psql (and connection attempts with libpq) fail. Example: uname -a HP-UX levanto B.11.11 U 9000/800 554706577 unlimited-user license nslookup jetstream Using /etc/hosts on: levanto looking up FILES Trying NIS Name:jetstream.sonalysts.com Address: 198.6.213.78 Aliases: jetstream, jet Other applications (telnet, ftp, ping) have no problems resolving hostnames. psql -h jetstream -U wxstat wxstation psql: could not translate host name "jetstream" to address: host nor service provided, or not known psql -h 198.6.213.78 ... ... works. Error does *not* occur on HP-UX B.11.00 box with postgresql installed/built the same way, and with identical pg_hba.conf and postgresql.conf ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
[BUGS] BUG #1079: ALTER TABLE does not add foreign key
The following bug has been logged online: Bug reference: 1079 Logged by: Vladimir Sitarchuk Email address: [EMAIL PROTECTED] PostgreSQL version: 7.3 Operating system: Red Hat 9 Description:ALTER TABLE does not add foreign key Details: ALTER TABLE tablename ADD COLUMN columnname INT CONSTRAIN cntrname REFERENCES tablename2(col) adds the column But it does not add the foreign key constrain. ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [BUGS] BUG #1079: ALTER TABLE does not add foreign key
On Wednesday 11 February 2004 17:29, PostgreSQL Bugs List wrote: > The following bug has been logged online: > > Bug reference: 1079 > Logged by: Vladimir Sitarchuk > Email address: [EMAIL PROTECTED] > > PostgreSQL version: 7.3 > Operating system: Red Hat 9 > Description:ALTER TABLE does not add foreign key > > Details: > ALTER TABLE tablename ADD COLUMN columnname INT CONSTRAIN cntrname > REFERENCES tablename2(col) > adds the column But it does not add the foreign key constrain. Perhaps the manual should be clearer on this. You can add a foreign key with something like (example from manual): ALTER TABLE distributors ADD CONSTRAINT distfk FOREIGN KEY (address) REFERENCES addresses(address) MATCH FULL; -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
[BUGS] BUG #1080: Ref #1045 resolved
The following bug has been logged online: Bug reference: 1080 Logged by: Josh Rovero Email address: [EMAIL PROTECTED] PostgreSQL version: 7.4 Operating system: HP-UX 11.11 (aka 11i) Description:Ref #1045 resolved Details: Error "psql: could not translate host name "jetstream" to address: host nor service provided, or not known" can be fixed on HP-UX 11.11 by applying HP OS patch PHNE_27796 (libnss_dns DNS backend patch). This patch has two patch dependencies which are also required: PHCO_29029: libc cumulative patch PHCO_24402: libc cumulative header patch. Critical patch found by doing a search for getaddr in the HP patch database. Unfortunately, these are *not* included on the update CDs are part of the recommended patch set. ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Re: [BUGS] I find a bug (IMHO)
Tom Lane wrote: > Danger Dancer <[EMAIL PROTECTED]> writes: > > #little example > > create table a (d int check (d<5)); > > create table b () inherits (a); > > alter table b drop constraint "a_d"; > > I think the bug is that it allowed you to do this. You should not be > able to drop an inherited constraint, any more than you can drop an > inherited column. Added to TODO: o Disallow dropping of an inherited constraint -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster