Re: [GENERAL] Domains, check_violation and undefined column field in error

2015-09-11 Thread David G. Johnston
On Friday, September 11, 2015, Andri Möll wrote: > Hey, > > I'm giving DOMAINs a shot and created a simple one with a CHECK on > PostgreSQL 9.4.4. Sadly, when the check fails, the thrown error (23514, > check_violation) doesn't seem to contain the column information in the "c" > field. Should it?

Re: [GENERAL] domains, case statements, functions: bug?

2013-07-09 Thread Adrian Klaver
On 07/08/2013 06:58 PM, Tom Lane wrote: Adrian Klaver writes: test=> create function f(t) returns m as $$ select case when true then $1.c end $$ language sql; ERROR: return type mismatch in function declared to return m DETAIL: Actual return type is numeric. pg_typeof is somewhat helpful he

Re: [GENERAL] domains, case statements, functions: bug?

2013-07-08 Thread Tom Lane
Adrian Klaver writes: > test=> create function f(t) returns m as $$ select case when true then > $1.c end $$ language sql; > ERROR: return type mismatch in function declared to return m > DETAIL: Actual return type is numeric. pg_typeof is somewhat helpful here: regression=# select pg_type

Re: [GENERAL] domains, case statements, functions: bug?

2013-07-08 Thread Adrian Klaver
On 07/08/2013 10:26 AM, Joe Van Dyk wrote: create domain m numeric(5,2); create table t (c m); create function f(t) returns m as $ select case when true then $1.c end $ language sql; psql:/tmp/t1.sql:3: ERROR: return type mismatch in function declared to return m DETAIL: Actual return type is

Re: [GENERAL] Domains

2006-02-19 Thread Michael Glaesemann
On Feb 18, 2006, at 20:46 , Harald Armin Massa wrote: I do not know about the word "domains" in this usage. http://www.postgresql.org/docs/8.1/interactive/sql-createdomain.html Michael Glaesemann grzm myrealbox com ---(end of broadcast)---

Re: [GENERAL] Domains

2006-02-19 Thread Peter
Hi, Thanks for the suggestion. However I just wanted to give a brief description of something I want to achieve. I believe such feature will be very useful in more complicated environments. Kind regards, Peter Michael Glaesemann wrote: On Feb 19, 2006, at 2:12 , Stephan Szabo wrote: O

Re: [GENERAL] Domains

2006-02-18 Thread Michael Glaesemann
On Feb 19, 2006, at 2:12 , Stephan Szabo wrote: On Sat, 18 Feb 2006, Peter wrote: Hello, I am migrating to postgresql from another database. I want to take advantage of using domains. Let's suppose I create domain 'email'(varchar 128). Then I change my mind and want to increase all columnst

Re: [GENERAL] Domains

2006-02-18 Thread Stephan Szabo
On Sat, 18 Feb 2006, Peter wrote: > Hello, > > I am migrating to postgresql from another database. I want to take > advantage of using domains. Let's suppose I create domain > 'email'(varchar 128). Then I change my mind and want to increase all > columnst that have type 'emaill' to varchar(255). H

Re: [GENERAL] Domains

2006-02-18 Thread Harald Armin Massa
I do not know about the word "domains" in this usage.But all your problems with "varchar(x)" for any values of x are solved by just using type "text"Harald 'email'(varchar 128). Then I change my mind and want to increase all columnst that have type 'emaill' to varchar(255). -- GHUM Harald Massapers

Re: [GENERAL] Domains with constraints?

2004-05-16 Thread Peter Eisentraut
Dennis Gearon wrote: > I have an older manual. Here are newer ones: http://www.postgresql.org/docs/ ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [GENERAL] Domains (Was [PERFORM] Views With Unions)

2003-08-01 Thread Ron Johnson
On Fri, 2003-08-01 at 12:26, Francisco J Reyes wrote: > On Fri, 1 Aug 2003, Tom Lane wrote: [snip] > accros some tables. Currently I used inheritance to enforce the consitency > since a good number of fields needed to be common among the tables AND the > inheritted tables are basically a supperset