On Sun, Mar 28, 2010 at 2:27 PM, Andre Lopes wrote:
> Hi,
>
> I'am writing some code in PHP and I need to generate a valid postgresql
> TIMESTAMP with PHP.
>
> Any PHP programmer thar can help me on how to generate valid TIMESTAMP's
> with PHP?
>
> Sorry my bad english.
>
>
> Best Regards,
>
In p
Hey list,
I have a cron script that runs a couple cleanup commands on my
database. It runs three commands:
VACUUM ANALYZE;
CLUSTER;
REINDEX DATABASE "database";
They are run in the above order. I was wondering if there's a better
order to do this in. For example, should the ANALYZE be run _after_
On Tue, Jan 26, 2010 at 11:54 AM, Moe wrote:
> Hi folks,
>
> I have a simple script file db :
> #!/bin/bash
> pg_dump -U postgres prodDB > /var/a/db/$(date "+%Y-%m-%d_%H:%M")-prodDB.dump
>
> --
> Which works fine when executed manually ( ./db ).. I get a dump file which
> is around 1.9 MB
On Wed, Dec 30, 2009 at 12:11 PM, shulkae wrote:
> I am newbie to postgres/SQL.
>
> I want to delete all rows exceeding 400 hours (10 days) and I want to
> limit deletion of only 100 records at a time.
>
> I was trying the following in PostgreSQL:
>
> DELETE from mytable WHERE (now() - timestamp_f
On Tue, Nov 17, 2009 at 7:15 PM, William Carithers wrote:
> On 11/17/09 4:04 PM, "William Carithers" wrote:
>
>> I get an "Error: relation "boolean" does not exist when attempting to create
>> a table with columns of data type boolean. I using PostgreSQL 8.3.6 and the
>> docs say that it supports
On Thu, Oct 1, 2009 at 5:02 PM, Tom Lane wrote:
> APseudoUtopia writes:
>>> Here's what happened:
>>>
>>> $ vacuumdb --all --full --analyze --no-password
>>> vacuumdb: vacuuming database "postgres"
>>> vacuumdb: vacuuming database &
On Thu, Oct 1, 2009 at 4:21 PM, Scott Marlowe wrote:
> On Thu, Oct 1, 2009 at 1:12 PM, APseudoUtopia wrote:
>
>> Sorry, I failed to mention:
>>
>> PostgreSQL 8.4.0 on i386-portbld-freebsd7.2, compiled by GCC cc (GCC)
>> 4.2.1 20070719 [FreeBSD], 32-bit
>
>
On Thu, Oct 1, 2009 at 3:10 PM, APseudoUtopia wrote:
> Hey list,
>
> After some downtime of my site while completing rigorous database
> maintenance, I wanted to make sure all the databases were fully
> vacuumed and analyzed. I do run autovacuum, but since I made several
> sign
Hey list,
After some downtime of my site while completing rigorous database
maintenance, I wanted to make sure all the databases were fully
vacuumed and analyzed. I do run autovacuum, but since I made several
significant changes, I wanted to force a vacuum before I brought my
site back online.
He
On Tue, Sep 29, 2009 at 1:26 PM, Vick Khera wrote:
> I'm running Pg 8.3.7 on FreeBSD 7.2.
>
> I have some code in Perl that does a bunch of inserts and updates with
> all constraints deferred. On occasion, one of the FK's gets violated
> and the transaction commit fails.
>
> I trap this with code
On Sun, Sep 6, 2009 at 9:57 PM, APseudoUtopia wrote:
> Hey list,
>
> I have a forum. I'm in the process of adding a full-text search. The
> forum is split into a couple tables, including forums_posts and
> forums_topics. The latter contains only the title of the topic and
>
Hey list,
I have a forum. I'm in the process of adding a full-text search. The
forum is split into a couple tables, including forums_posts and
forums_topics. The latter contains only the title of the topic and
some other information, like an ID number. The forums_posts table
contains the body of t
Hello,
I'm working on setting up a full-text search for some descriptions
stored in my database. I'm running pg 8.4.
>From what I can tell, there are two functions. One function,
to_tsquery(), requires that boolean operators (&, |, !) are between
every word. The other function, plainto_tsquery()
On Thu, Sep 3, 2009 at 12:52 PM, Edoardo Panfili wrote:
> I have an enum type
> CREATE TYPE shapeName AS ENUM('rectangle','circle');
>
> now I need another value: 'square'
>
> the pg_type.oid of 'shapename is 16458
>
> It works, but Is it safe to use this?
> insert into pg_enum (enumtypid,enumlabel
Hey list,
I have a dump of a table from a mysql database. I spent the last two
days running search-and-replace regexes and other such formatting
changes in order to get it loadable into PostgreSQL. I finally got to
what seemed like the end of the process, when this happened as I tried
to load it:
Hey,
I'm having some problems when inserting special characters into a
column. Here's the table:
--
Table "public.users_history_ip"
Column |Type | Modifiers
+---
Hey,
I'm writing a backup script. Right now, I only have one database on my
postgresql server. I'm deciding if I should use pg_dump or pg_dumpall when
backing up the server. As far as I can tell, pg_dumpall cannot compress the
dumps automatically and it only dumps data in the standard SQL text fil
On Mon, Jun 29, 2009 at 2:26 PM, David Kerr wrote:
> On Sat, Jun 27, 2009 at 08:23:26PM -0400, APseudoUtopia wrote:
> - Hey list,
> -
> - I'm migrating my site away from MySQL to PostgreSQL. So far, it's been
> - going great. However, there's one problem I'
On Sat, Jun 27, 2009 at 9:13 PM, justin wrote:
> APseudoUtopia wrote:
>
> Hey list,
>
> I have a query which allows users to "Catch up" on read posts on the
> forum. It works by either updating or inserting the "last post read"
> number from every forum
Hey list,
I'm migrating my site away from MySQL to PostgreSQL. So far, it's been
going great. However, there's one problem I've been having trouble
solving.
I have a query which allows users to "Catch up" on read posts on the
forum. It works by either updating or inserting the "last post read"
nu
Hey,
I'm new to using transactions. I'd like to integrate them into my PHP
application to prevent a few issues we've been having. Such as, some
queries in the beginning of the php script running, then an error
occurring, preventing queries toward the bottom of the script from
running. It's leaving
Hey,
I created an ENUM type. However, I accidentally typoed in one of the
enum values. It is "apps" and it should be "app". What's the best way
to modify this without dropping the type? I have many tables which
have columns that depend on the type, and I'm trying to avoid having
to recreate all th
Hey list,
I have a table with user IDs, among other information. I also have a
table of comments that users can place on a page.
CREATE TABLE "users" (
"id" SERIAL PRIMARY KEY,
...
);
CREATE TABLE "comments" (
"id" SERIAL PRIMARY KEY,
"userid" INTEGER REFERENCES "users" ("id") ON DELETE REST
23 matches
Mail list logo