# 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 w
# 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?
-------
bably 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
-
* 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,
' and your table is 'users', 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 attn
* 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.c
rs will implement queries 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 Kla
t them...
xinu=> select (1 + 1) + 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)
* 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 |
entation on the postgreSQL site is going to be your 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.co
y (grocery_types_id)=(100) is not present in table "grocery_types".
--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Replication & Support Services, (503) 667-4564
---(end of broadcast)---
TIP
* 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'
e', '0.75');
INSERT INTO grocery_items (grocery_types_id, name, price) VALUES (1, 'Brocolli',
'1.35');
INSERT INTO grocery_items (grocery_types_id, name, price) VALUES (1, 'Lettuce',
'2.55');
HTH,
--
Steven
* 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 Programm
* 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 wh
ION 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;
--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Replicatio
Ls and neither of them 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.
g you can do with 'alter database' as well.
--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Replication & Support Services, (503) 667-4564
---(end of broadcast)---
TIP
* 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 Replicati
hema'");
- or -
$dbh->query('SELECT foo FROM my_schema.bar WHERE active');
--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Replication & Support Services, (503) 667-4564
---(end of broadcast)-
he
dbname, host, 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/
Postgre
$dbh=DBI->connect("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.
should
> I simply do all my 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:
* 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
> >> sea
* 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
tub_entry.pay_stub_id = pay_stub.id)
WHERE 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;
--
Ste
* 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,
* 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.commandpromp
28 matches
Mail list logo