Brian Blaha wrote:
>
> I would like to write a function as a set of SQL statements, and then
> use that function
> in a trigger. However, since triggers require a return type of opaque,
> and SQL functions
> cannot return type opaque, this doesn't look possible. Am I missing
> something? The SQL
george young <[EMAIL PROTECTED]> writes:
> The question is: would I be better off losing all those integer ids
> and just using the text names as primary indices? Is there much
> performance lost comparing text strings for every index operation?
Strings would be slower, but possibly not by enoug
Hi,
Thank you for the previous help (INNER BETWEN MORE
THAN ONE DATABASES).
In the Visual Basic 6.0:
Dim dbConn as Connection, rs as
recordset, strSQL as string, strConn as string
strConn =
"Provider=MSDASQL.1;Extended
Properties=""DRIVER={PostgreSQL};DATABASE=MyDataBase;SERV
[linux, postgresql 7.2, 500MHz * 4 xeon cpu's, 1GB ram, hardware raid]
My current db has serveral instances of something like:
table foos(fooid int2, fooname text, foouser text, foobar int2 references
bars(barid))
table bars(barid int2, barname text, barcolor text, primary key(barid) )
et
Larry Rosenman writes:
> I have a table with the following, in part:
>
> contract_start date
> contract_term int (term in MONTHS)
Store contract_term as interval?
--
Peter Eisentraut [EMAIL PROTECTED]
---(end of broadcast)---
TIP 1: subscrib
Larry,
> contract_start date
> contract_term int (term in MONTHS)
>
> I want to calculate the contract end date. I came up with:
> CREATE FUNCTION "get_contract_end" (integer) RETURNS date AS 'SELECT
> cast(contract_start + cast(cast(contract_term as text) || '' month''
> as
> interval) as dat
=?iso-8859-1?Q?Domoszlai_L=E1szl=F3?= <[EMAIL PROTECTED]> writes:
> I would like to make symmetrical(set) difference in a query.
> But the simpliest way I could find is
> select id from a
> except
> select id from b
> union
> select id from b
> except
> select id from a
> Is there any better
On Tue, 15 Oct 2002, Peter Galbavy wrote:
> FAQ: A search yielded nothing explicit...
>
> I have an INSERT statement:
>
> INSERT INTO metadata (md5, origin, name, value)
> VALUES ('fd859f263bd0579935f2146a22d24f32', 'EXIF',
> 'UserComment', '')
>
> but this fails (using Perl DBI, DB
Brian Blaha <[EMAIL PROTECTED]> writes:
> I would like to write a function as a set of SQL statements, and then
> use that function
> in a trigger. However, since triggers require a return type of opaque,
> and SQL functions
> cannot return type opaque, this doesn't look possible.
You could cal
Richard Huxton <[EMAIL PROTECTED]> writes:
> On Monday 14 Oct 2002 6:17 pm, Tom Lane wrote:
>> Unfortunately that's not true at all, or at least not helpful for this
>> problem. The cachable attribute was poorly named, because it leads
>> people to think that PG *will* cache function results, as
Hello,
I would like to make symmetrical(set) difference in a query.
But the simpliest way I could find is
select id from a
except
select id from b
union
select id from b
except
select id from a
Is there any better solution for this problem?
Thanks
Laca
---(end of
I have a table with the following, in part:
contract_start date
contract_term int (term in MONTHS)
I want to calculate the contract end date. I came up with:
CREATE FUNCTION "get_contract_end" (integer) RETURNS date AS 'SELECT
cast(contract_start + cast(cast(contract_term as text) || '' month'
Please ignore me for now. The string is NOT empty, but full of NUL
characters. My bad for not using 'less' to view the output...
Peter
- Original Message -
From: "Peter Galbavy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 15, 2002 11:01 AM
Subject: [SQL] how do i i
Sorry: 7.3 beta 2 on OpenBSD 3.2
Peter
- Original Message -
From: "Peter Galbavy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 15, 2002 11:01 AM
Subject: [SQL] how do i insert an empty string ?
> FAQ: A search yielded nothing explicit...
>
> I have an INSERT statem
FAQ: A search yielded nothing explicit...
I have an INSERT statement:
INSERT INTO metadata (md5, origin, name, value)
VALUES ('fd859f263bd0579935f2146a22d24f32', 'EXIF',
'UserComment', '')
but this fails (using Perl DBI, DBD::Pg) because $dbh->quote() returns two
single quotes, wh
On Monday 14 Oct 2002 6:17 pm, Tom Lane wrote:
> Richard Huxton <[EMAIL PROTECTED]> writes:
> > Have you looked at marking f1() etc cachable? This means Postgresql
> > will only call the function once for each parameter-set.
>
> Unfortunately that's not true at all, or at least not helpful for thi
On Tuesday 15 Oct 2002 8:47 am, Keith Gray wrote:
> Ludwig Lim wrote:
> > As of now, Max() doesn't utilizes the indices hence
> > it always do a sequential scan.
>
> Thanks Ludwig,
>
> That does help performance, but I was using a "standard"
> SQL command wrapped in a VB6 ADO ODBC program.
>
> I
Ludwig Lim wrote:
>>I have just been comparing some large table
>>performance under 7.1 using the
>>
>> select max(primary key)from table;
>>
>
> Try using the following as alternative :
>
> SELECT primary_key
> FROM table
> ORDER BY primary_key desc
> LIMIT 1;
>
> This shou
18 matches
Mail list logo