Hey,
Is it possible to create a new type as an alias to a pre-defined type? I
use "USERID varchar(20)" in almost every table I have I'd like to make
an alias for that type eg.
create type myschema.useridtype as varchar(20);
I might have to alter the type some day and this way I'd have to
O Veikko Mδkinen έγραψε στις Jun 22, 2005 :
> Hey,
>
> Is it possible to create a new type as an alias to a pre-defined type? I
> use "USERID varchar(20)" in almost every table I have I'd like to make
> an alias for that type eg.
>
>
>create type myschema.useridtype as varchar(20);
>
>
On Jun 22, 2005, at 7:42 AM, Achilleus Mantzios wrote:
O Veikko Mδkinen έγραψε στις Jun 22, 2005 :
Hey,
Is it possible to create a new type as an alias to a pre-defined
type? I
use "USERID varchar(20)" in almost every table I have I'd like to make
an alias for that type eg.
create typ
On Wed, Jun 22, 2005 at 08:04:39 -0400,
Sean Davis <[EMAIL PROTECTED]> wrote:
>
>
> Just for my own edification, does creating a "simple" domain like this
> then require a whole set of functions for indexing, etc., like other
> more complex user-defined types, or will postgres "do the right t
Veikko Mäkinen wrote:
Hey,
Is it possible to create a new type as an alias to a pre-defined type? I
use "USERID varchar(20)" in almost every table I have I'd like to make
an alias for that type eg.
CREATE DOMAIN username_string AS varchar(20);
Test it with your client applications though, m
O Sean Davis έγραψε στις Jun 22, 2005 :
>
> On Jun 22, 2005, at 7:42 AM, Achilleus Mantzios wrote:
>
> > O Veikko MΞ΄kinen ΞΞ³ΟΞ±ΟΞ΅ ΟΟΞΉΟ Jun 22, 2005 :
> >
> >> Hey,
> >>
> >> Is it possible to create a new type as an alias to a pre-defined
> >> type? I
> >> use "USERID varchar(20)" in
Richard Huxton wrote:
Veikko Mäkinen wrote:
Hey,
Is it possible to create a new type as an alias to a pre-defined type?
I use "USERID varchar(20)" in almost every table I have I'd like to
make an alias for that type eg.
CREATE DOMAIN username_string AS varchar(20);
Test it with your clie
Keep in mind, though. Using a DOMAIN in some definition 'seals' the domain.
Yo can't change the domain unless you drop all dependent objects
|-Original Message-
|From: Veikko Mäkinen [mailto:[EMAIL PROTECTED]
|Sent: Mittwoch, 22. Juni 2005 15:14
|To: pgsql-sql@postgresql.org
|Subject: Re:
Hello,
I have created a trigger function to update the sort_order column of a
mapping table. I have table a that has a many to many relation ship with
table b that is mapped as a_b where a_id, and b_id are the pk columns and
there is a sort_order column. Since a_b is a mapping table there are
On Wed, 22 Jun 2005, Russell Simpkins wrote:
> Hello,
>
> I have created a trigger function to update the sort_order column of a
> mapping table. I have table a that has a many to many relation ship with
> table b that is mapped as a_b where a_id, and b_id are the pk columns and
> there is a sort
Stephan Szabo <[EMAIL PROTECTED]> writes:
>> CREATE TRIGGER u_test1 BEFORE DELETE ON portfolio.test1 FOR EACH ROW EXECUTE
>> PROCEDURE resort_test1();
> I think this will work in an after delete trigger, but not in a before
> delete trigger (and seems to in my tests). I'm not sure what the spec sa
On Wed, 22 Jun 2005, Tom Lane wrote:
> Stephan Szabo <[EMAIL PROTECTED]> writes:
> >> CREATE TRIGGER u_test1 BEFORE DELETE ON portfolio.test1 FOR EACH ROW
> >> EXECUTE
> >> PROCEDURE resort_test1();
>
> > I think this will work in an after delete trigger, but not in a before
> > delete trigger (a
I suspect that if you read the spec carefully it would want a "triggered
data change violation" error raised here. My advice is not to use a
BEFORE trigger for this.
What would you recommend then. I am using Hibernate in my java application
and if the sort_order column (in this example colum
Hi,
I am trying to convert from SQL_ASCII to UNICODE.
I have a program that will read from a table in one database
and write to a table in a different database.
I am hoping this all I need do (One data base is SQL_ASCII and
the other is UNICODE).
I get a byte sequence error writi
Stephan Szabo <[EMAIL PROTECTED]> writes:
> Is there anything we have right now that will handle this kind of thing
> without requiring either updating all the counts after a deletion in a
> statement trigger or once per row updating all the counts for records with
> the same "a" (doing something l
Actually, I had a larger script that did exactly what you propose. However I
started to think that a profecient where clause would do the trick.
In my mapping table, a and b are primary keys. a_id, b_id, c_sort_order.
a_id is the parent and b_id is the child for my purposes, so if a_id is
dele
16 matches
Mail list logo