Mike Rylander <[EMAIL PROTECTED]> writes:
> Here's mine:
> CREATE FUNCTION max2 (INTEGER,INTEGER) RETURNS INTEGER
> LANGUAGE SQL AS
> 'SELECT CASE WHEN $1 > $2 THEN $1 ELSE $2 END';
BTW, most of the standard datatypes have these already, because they are
the transition functions for the MAX()
Here's mine:
CREATE FUNCTION max2 (INTEGER,INTEGER) RETURNS INTEGER
LANGUAGE SQL AS
'SELECT CASE WHEN $1 > $2 THEN $1 ELSE $2 END';
This returns:
database=# select max2(1,2);
max2
--
2
(1 row)
database=# select max2(3,1);
max2
--
3
(1 row)
On Friday 17 October 2003 02
Hallo, Liste!
Gibt es schon (konkrete) Pläne, analog zum IPv4-Datentyp auch IPv6 als
Datentyp in PostgreSQL zu implementieren?
Interessieren würde mich auch, was der Unterschied zwischen den beiden
schon bestehenden Datentypen "inet" und "cidr" ist.
Vielen Dank schon im voraus für Eure Antwort
I have a question
How could I add a column in a table but specific
colid?
Thanks
Hallo, Ewald,
vielen Dank für Deine Antwort.
Am 17 Oct 2003 um 13:43 hat Ewald Geschwinde geschrieben:
> [EMAIL PROTECTED] wrote:
>
> >Hallo, Liste!
> >
> >Gibt es schon (konkrete) Pläne, analog zum IPv4-Datentyp auch IPv6
als
> >Datentyp in PostgreSQL zu implementieren?
> >
> >Intere
Hello!
I'm looking for a function to calculate the max value from two numbers,
something like max2(a,b) with a,b int
Does anyone have the trick ?
Thank you in advance..
Rodrigo!
---(end of broadcast)---
TIP 3: if posting/reading through
Kumar,
pg_class.relname is type "name". You are trying to compare it to p_tablename
which is type "varchar". Try changing your function definition to:
CREATE OR REPLACE FUNCTION public.desc_table(name)
HTH
George
SNIP
> CREATE OR REPLACE FUNCTION public.desc_table(varchar)
> RETURNS re
On Fri, 17 Oct 2003, Kumar wrote:
> But I have get into another problem. While I execute the following command I
> could get the result as U can see below
>
> etgsuite=# SELECT a.attname,format_type(a.atttypid, a.atttypmod),
> a.attnotnull, a.atthasd
> ef, a.attnum
> FROM pg_class c, pg_attribute
http://developer.postgresql.org/
unten der link sgml docs
[EMAIL PROTECTED] wrote:
> Hallo, Ewald,
>
> vielen Dank für Deine Antwort.
>
> Am 17 Oct 2003 um 13:43 hat Ewald Geschwinde geschrieben:
>
>> [EMAIL PROTECTED] wrote:
>>
>> >Hallo, Liste!
>> >
>> >Gibt es schon (konkrete) Pläne, analog z
But I have get into another problem. While I execute the following command I
could get the result as U can see below
etgsuite=# SELECT a.attname,format_type(a.atttypid, a.atttypmod),
a.attnotnull, a.atthasd
ef, a.attnum
FROM pg_class c, pg_attribute a
WHERE c.relname = 'companies'
AND a.attnum > 0
I am sorry. Yes it worked.
Thank you very much Mr. Jordan and Mr. Richard.
- Original Message -
From: "Richard Huxton" <[EMAIL PROTECTED]>
To: "Kumar" <[EMAIL PROTECTED]>; "Jordan S. Jones" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, October 17, 2003 2:54 PM
Subject: Re: [SQ
[EMAIL PROTECTED] wrote:
>Hallo, Liste!
>
>Gibt es schon (konkrete) Pläne, analog zum IPv4-Datentyp auch IPv6 als
>Datentyp in PostgreSQL zu implementieren?
>
>Interessieren würde mich auch, was der Unterschied zwischen den beiden
>schon bestehenden Datentypen "inet" und "cidr" ist.
>
>Vielen Da
On Friday 17 October 2003 09:44, Kumar wrote:
> Hi ,
>
> Jordan, thanks for ur reply. But I am not asking that.
>
> I want to get all the column names of any table at the PgAdmin3 SQL Window.
> To make it more clear, actually i wanted to send the table name as the
> input parameter for a function a
Hi ,
Jordan, thanks for ur reply. But I am not asking
that.
I want to get all the column names of any table at the
PgAdmin3 SQL Window. To make it more clear, actually i wanted to send the table
name as the input parameter for a function and expecting the column names, data
types, etc as
14 matches
Mail list logo