# i'm setting up a forum that's connected to postgresql 7.4.2 (via
# drupal.org framework) and i'm getting some errors. here's the link,
# followed by the errors verbatim: http://128.32.146.140/dmap/?q=forum
We would have to see database.pgsql.inc to tell you what's wrong with
it.
--
Steven
# I need to to change an ip addres in a plpgsql function from
# aaa.bbb.ccc.ddd to an sring containing aaa bbb ccc ddd upload.
sklassen= select replace('216.237.145.1'::text, '.', ' ') || ' upload';
?column?
--
216 237 145 1 upload
(1 row)
--
Steven Klassen
attempting to do by
having PHP or something comprable generate the javascript data sets
you want when the page is rendered.
--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Replication Support Services, (503) 667-4564
---(end
* Eric [EMAIL PROTECTED] [2004-10-27 14:14:25 -0400]:
Is there something to interface postgreSQL with QMail to store mails
in pgsql instead of using mbox or maildir?
This looks informative:
http://qmail-sql.digibel.be/
--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http
in their code
without testing them. Unfortunately, that's probably not too far from
reality. I've thought of it as a nice debugging feature while I'm
trying to hammer out a complicated query for the first time.
--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com
* Thomas Hallgren [EMAIL PROTECTED] [2004-10-25 19:06:40 +0200]:
I don't see how that makes a difference really.
/me notes the timestamp on his post and vows never to post before 8am
again.
--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL
', for example:
SELECT attname
FROM pg_namespace, pg_attribute, pg_type, pg_class
WHERE pg_type.oid = atttypid
AND pg_class.oid = attrelid
AND pg_namespace.nspname = 'public'
AND relnamespace = pg_namespace.oid
AND relname = 'users'
AND attnum = 1;
--
Steven Klassen - Lead Programmer
Command Prompt, Inc
) + 1 as answer;
answer
3
(1 row)
--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Replication Support Services, (503) 667-4564
---(end of broadcast)---
TIP 7: don't forget
best bet
for up-to-date information, but the Practical PostgreSQL book is still
an easy read for the basics.
http://www.commandprompt.com/ppbook/
--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Replication Support Services, (503) 667-4564
* Steven Klassen [EMAIL PROTECTED] [2004-10-17 01:52:47 -0700]:
xinu= select * from items_types_view;
id | item_name | type_name
+---+---
1 | Apple | fruit
2 | Orange| fruit
3 | Brocolli | fruit
4 | Lettuce | fruit
(4 rows)
And after I fixed
, 'Brocolli',
'1.35');
INSERT INTO grocery_items (grocery_types_id, name, price) VALUES (1, 'Lettuce',
'2.55');
HTH,
--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Replication Support Services, (503) 667-4564
---(end
* Steven Klassen [EMAIL PROTECTED] [2004-10-16 17:42:17 -0700]:
INSERT INTO grocery_items (grocery_types_id, name, price) VALUES (1, 'Apple',
'0.50');
INSERT INTO grocery_items (grocery_types_id, name, price) VALUES (1, 'Orange',
'0.75');
INSERT INTO grocery_items (grocery_types_id, name
.
--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Replication Support Services, (503) 667-4564
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send
boolean AS 'SELECT
CASE WHEN passwd = md5($2) THEN true ELSE false END FROM pg_shadow
WHERE usename = $1;' LANGUAGE sql;
--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Replication Support Services, (503) 667-4564
---(end
* Steven Klassen [EMAIL PROTECTED] [2004-10-14 10:07:39 -0700]:
CREATE FUNCTION check_passwd(text,text) RETURNS boolean AS 'SELECT
CASE WHEN passwd = md5($2) THEN true ELSE false END FROM pg_shadow
WHERE usename = $1;' LANGUAGE sql;
Strike that - go with what Michael recommended. I glanced
* Dev [EMAIL PROTECTED] [2004-10-14 16:54:56 -0400]:
I am trying to get a total number of rows returned form a query.
SELECT count(this) from table group by this
Remove the 'group by' clause -- you don't need it.
--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http
active');
--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Replication Support Services, (503) 667-4564
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
* CSN [EMAIL PROTECTED] [2004-10-12 11:40:52 -0700]:
chown -R postgres.nobody data
chmod -R 0700 data
Try postgres.postgres, otherwise that looks okay AFAICT.
--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Replication Support Services
' as well.
--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Replication Support Services, (503) 667-4564
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http
have
anything to do with ownership, FWIW. ;)
http://www.postgresql.org/docs/current/interactive/sql-alterdatabase.html
http://www.postgresql.org/docs/current/interactive/runtime-config.html
Best Regards,
--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com
(dbi:Pg:dbname='samik';host='abc.org';port=5432,samik,);
It seems that machine can't resolve abc.org (although I can). The
format of your connect string is a little unorthodox, but it seems to
work in general.
What does 'dig abc.org' return on this machine?
--
Steven Klassen - Lead Programmer
Command
, and port directives are space delimited.
I didn't catch earlier that you said it works on the command line but
not as a CGI. I'll have another look at the original post.
--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Replication Support Services
* Pierre-Frédéric Caillaud [EMAIL PROTECTED] [2004-10-07 10:45:57 +0200]:
I'd advise psycopg as the fastest one (by a factor of 10x on large
selects).
I second this recommendation.
--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Replication
* Eyinagho Newton [EMAIL PROTECTED] [2004-10-07 09:41:47 -0700]:
Can anyone explain how postgreSQL reads from a text file into tables
already created in PostgreSQL?
Where did this text file come from? What format is it in?
--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http
pay_stub.created_data =1096527603;
delete from pay_stub where id in (select id from pay_stub where
created_date = 1096527603 order by created_date desc); commit;
DELETE FROM pay_stub WHERE created_data =1096527603;
--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com
* Steven Klassen [EMAIL PROTECTED] [2004-10-07 12:33:34 -0700]:
DELETE FROM pay_stub_entry
JOIN pay_stub ON (pay_stub_entry.pay_stub_id = pay_stub.id)
WHERE pay_stub.created_date =1096527603;
After RTFM'ing it appears you can't do actual joins with delete so
we'll just have to daisy-chain
* Tom Lane [EMAIL PROTECTED] [2004-10-07 16:33:26 -0400]:
Steven Klassen [EMAIL PROTECTED] writes:
* Mike Benoit [EMAIL PROTECTED] [2004-10-07 11:47:50 -0700]:
I assume I'm not the first person to run in to this, however
searching google didn't seem to come up with anything useful
date/time conversion in my application?
The time zone support seems pretty exhaustive. Check out section B-r
in the document below.
http://www.postgresql.org/docs/7.4/static/datetime-keywords.html
HTH,
--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com
28 matches
Mail list logo