Re: [GENERAL] Wordpress & PostgreSQL ...
Dawid Kuroczko wrote: Suppose one would like to create a WordPress workalike, i.e. a blogging engine sharing look&feel of WordPress but written from scratch. What language/framework do you think would be the best? Try Squeak/Seaside (www.seaside.st). The continuation stuff is optional, you can use it just for the great development environment, html generation framework, fairly decent VM (or very speeding commercial VM available via Cincom Smalltalk), and a bunch of other reasons. ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [GENERAL] Select first ten of each category?
Michael Glaesemann wrote: Without using UNION, (which would require writing a select statement for each category), how would LIMIT allow him to do this for each category in a single query? You're right, it would need a UNION, and a SELECT per category. So there'd be another SELECT to find all the categories beforehand. ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [GENERAL] Select first ten of each category?
Benjamin Smith wrote: It has a LARGE number of entries. I'd like to grab the 10 most expensive items from each category in a single query. How can this be done? Use a LIMIT on your SELECT. See: http://www.postgresql.org/docs/8.1/static/queries-limit.html ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
Re: [GENERAL] connecting to server process via sockets
Randall Smith wrote: > > For fun and learning, I would like to connect to the Postgresql backend > and issue queries using sockets. I'm using Python's socket module. I'm > new to socket programming, but I'm experienced with Python and > Postgresql. Look in the postgres docs for the section on frontend/backend protocol. The handshaking and format of the bytes that go across the socket are explained in that doc. section. You also might want to look at: http://ca.geocities.com/[EMAIL PROTECTED]/pgsqueak/ where there are links to a class diagram and state diagram of an implementation done in Squeak Smalltalk. I don't know Python, but IMHO the basic design should be transferable. Note that frontend/backend protocol version 2 is implemented in that code, and the current docs will reflect version 3 (so you'd have to look at the older docs to match up the code). Hope that helps. --yanni ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [GENERAL] Perl and AutoCommit
Madison Kelly wrote: > >What I am trying to do is turn off autocommit for one particular task > in my program. I realize I can turn off AutoCommit when I connect to the > database but in this case that is not what I want to do. This is a > one-off task. > >What I thought would work was: > > $DB->begin_work() || die... > # a lot of transactions > $DB->commit() || die... > >But that doesn't seem to be it, either... The way I read the postgres docs, there is no autocommit. Every sql command is wrapped in a transaction, unless you issue a "BEGIN" (or "START TRANSACTION"). What makes you think that the code above did not work? What Perl library are you using? What does $DB->begin_work() actually do? --I'm thinking there could be a $DB->begin_transaction() You could turn on some trace output in the postgres server (i.e. postmaster), and observe the sequence of SQL that is being sent. HTH. --yanni ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster