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?
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? Is it just not implemented?
http://www.postgresql.org/d
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
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
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
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 numeric.
CONTEXT: SQL function "f"
I plan to define two domains with no contraints, sort of typedefs, to
work with date-times inside my application:
CREATE DOMAIN instant AS timestamp(3) with time zone;
CREATE DOMAIN localdatetime AS timestamp(3) without time zone;
Two questions:
1. I guess that there is no performance penalty
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)---
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
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
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
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
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). How do I change the
domain 'email' to the
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
I can create a function with a domain and
define it to return a domain.
The parameter is checked to see if it qualifies
in the constraint of the domain, however, the
return value is not.
Is this a bug? Is the author of the function
responsible for re-inforcing the constraint
at runtime?
This
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
16 matches
Mail list logo