Hi All,
Can we create a query to find different values based on different criteria =
from a table using case structure. For example
Select Into :DBComment
Case When localComment Is Null Then Comment
When localComment = '123' Then 'Numeric Comment'
Andre,
The only reason to have data for one query in different databases is if
the databases are on different machines. If you're running on PC-type
hardware, you might have to do that some times for performance reasons.
But if at that point, you should ask yourself if you shouldn't invest in
Mayuresh,
First, beginner's questions belong on the PGSQL-NOVICE list.
could anyone tell me how to make a primary key to AUTO INCREMENT. The
document is not exactly very explainatory about it :)
No, it is quite clear. See:
http://www.postgresql.org/idocs/index.php?datatype.html
section
Guard,
First, this kind of beginner question is more appropriate for the NOVICE
list.
IF update table set field='c:\windows'
but
c:\windows - c:windows
That's because \ is the Unix escape character. If I were to want to
save O'Reilly, for example, I could:
UPDATE table SET name =
Reiner Dassing [EMAIL PROTECTED] writes:
explain select * from wetter order by epoche desc;
NOTICE: QUERY PLAN:
Index Scan Backward using wetter_epoche_idx on wetter
(cost=0.00..3216018.59 rows=2034 width=16)
explain select * from wetter where epoche between '1970-01-01' and
I have seen several people asking about getting error numbers or similar things out of
postgres. The way I have done this is as follows:
CREATE TABLE errors (
errorstring TEXT PRIMARY KEY,
message TEXT
);
INSERT INTO errors VALUES ('^FATAL 1: Database ([^\]+) does not exist in
Hello PostgreSQl Users!
PostSQL V 7.1.1:
You should upgrade to 7.1.3 at some point...
I have defined a table and the necessary indices.
But the index is not used in every SELECT. (Therefore, the selects are
*very* slow, due to seq scan on
20 million entries, which is a test setup up to
Hello, I'm trying to set up a trigger on insert or update
but when using the predefined variable ``OLD'' I get a
NOTICE from the trigger function about OLD not being defined yet.
Of course OLD is not defined when the function is triggered on INSERT
event, and I did not mention it if not inside a
Reiner Dassing [EMAIL PROTECTED] writes:
Hello PostgreSQl Users!
PostSQL V 7.1.1:
I have defined a table and the necessary indices.
But the index is not used in every SELECT. (Therefore, the selects are
*very* slow, due to seq scan on
20 million entries, which is a test setup up to
Hi Esteban,
Your problem looks familiar to me,
and it seems you did not follow my advice.
Anyway, here is a C sample program which works.
It has nothing to do with wrong types, but with a
missing connection, but see for yourself.
/*
/opt/pgsql/bin/ecpg -o sampleprog01.c sampleprog01.sql
Just my two cents on the issue:
A good reason would be having several databases which
each use the same set of tables which contain some information
which takes a lot of storage, such as dictionaries or map
information. You wouldn't want to maintain several copies
of 500 Mb tables, especially
Delete from partitur where userid NOT IN (SELECT DISTINCT ON (userid)
userid, val, ts FROM partitur)
Haller Christoph [EMAIL PROTECTED] wrote in message
200110161445.QAA11833@rodos">news:200110161445.QAA11833@rodos...
This may look familiar to you - it was on the list last month.
Consider the
Thank you very much! Thanks to all who answered! An I will never again ask
silly questions here :-)
Stefan Lindner [EMAIL PROTECTED] schrieb im Newsbeitrag
9qf06v$20bh$[EMAIL PROTECTED]">news:9qf06v$20bh$[EMAIL PROTECTED]...
Is there any way to get system maintained keys from postgres? e.g. to
hi all,
could anyone tell me how to make a primary key to AUTO INCREMENT. The
document is not exactly very explainatory about it :)
Thankx in advance ...
Mayuresh
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send
Hi,
I'd like to do a query where can be possible I access tables from
diferent databases on the same query.
On MySQL, I do:
SELECT People1.PersID, People1.Name, Result1.Value, Result1.Date FROM
Database1.People1, Database2.Result1 WHERE ...
I think on ORACLE works like as:
SELECT
have a look at pg_hba.conf in your data dir. it's all in there.
Steve
Thomas Swan [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Is it possible to grant database level access to a user in PostgreSQL?
I have created a user and database, and I want the user to
On Mon, 22 Oct 2001 12:06:21 +0530, Mayuresh Kadu
[EMAIL PROTECTED] wrote:
hi all,
could anyone tell me how to make a primary key to AUTO INCREMENT. The
document is not exactly very explainatory about it :)
Thankx in advance ...
Mayuresh
Try first creating a sequence and then using the
In article [EMAIL PROTECTED], Josh Berkus wrote:
Reinier,
For future notice, [SQL] is the correct list for this kind of inquiry.
Please do not post it to [HACKERS]. And please don't cross-post ... it
results in a lot of needless duplication of effort.
I have defined a table and the
dear all
IF update table set field='c:\windows'
but
c:\windows - c:windows
--
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/users-lounge/docs/faq.html
First, I may be wrong but I do think they would prefer if you did not cross-post
(especially to hackers).
Second I think it probably make more sense to make two different triggers here.
If you really wanted to do it that way you might want to try executing that part.
Regards,
Aasmund.
On
Reiner Dassing [EMAIL PROTECTED] writes:
I would like to mention first, that I will use the [SQL] list for my
answers,
regarding the notice of Josh Berkus.
Q: did you use VACUUM ANALYZE?
A: This table was a test bed, just using INSERTS without ANY deletes or
updates
You still need to
Doug McNaught wrote:
Reiner Dassing [EMAIL PROTECTED] writes:
Hello PostgreSQl Users!
PostSQL V 7.1.1:
I have defined a table and the necessary indices.
But the index is not used in every SELECT. (Therefore, the selects are
*very* slow, due to seq scan on
20 million entries,
Josh Berkus wrote:
Aasmund,
Thank you for the clarification. Now that I know what you are doing, I
went through exactly the same thing about a year ago ... which is how we
discovered some additional problems with using OIDs in database design.
I was trying to spare you the same dead
23 matches
Mail list logo