Tom Lane | 1 May 2003 02:15
Picon

Re: LC_CTYPE

Jodi Kanter <jkanter <at> virginia.edu> writes:
> I am trying to select from pg_controldata but it does not seem to exist. 

Sorry --- it's a program not a table.  In 7.2 I believe it's in contrib.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

David A. Leedom | 1 May 2003 03:21

Restore Troubles

I am using Postgres 7.2.1, the default Debian Woody install.

I do a pg_dump on my database using:

         pg_dump superwallsdata  --blobs --file=superwallsdata.bak 
--format=c --verbose --compress=9 -U postgres -h server002.hightowergroup.com

When I try to restore with the following command:

         pg_restore superwallsdata.bak  -d superwallsdata --no-owner -S 
postgres -v -x -U postgres -h server005.hightowergroup.com -W -R

It will fail because of missing objects.  This is because many of the 
objects are out of order so I have to do a table of contents and 
finagle  the list before restore will go through.

I find that I must break my restore into three parts (maybe I only need 
two).  One for schema, one for data, and one for blobs.  If I don't the 
blobs part will fail with an unexpected termination from the database.

Finally when I do the restore it fails on the view at the end of this post 
(sorry for the size) with the error:

pg_restore: creating VIEW v_master_objects
pg_restore: [archiver (db)] could not execute query: ERROR:  CREATE TABLE: 
attribute "object_order" duplicated

I can add the view to the database after the restore, but that kind of 
defeats the purpose of having a restore command.

(Continue reading)

Jean-Michel Chabanne | 1 May 2003 08:14
Picon
Favicon

Re: LC_CTYPE

Jodi Kanter wrote:

> Tom
> I am trying to select from pg_controldata but it does not seem to 
> exist. Is this because I am running 7.2.3? How can I view all 
> available system tables?
> Thanks
> Jodi
>
> Tom Lane wrote:
>
>>Jodi Kanter <jkanter <at> virginia.edu> writes:
>>    
>>
>>>Can someone tell me how I can check to see what my locale setting is for 
>>>LC_CTYPE?
>>>      
>>>
>>
>>pg_controldata will tell you.  (As of CVS tip you can just go "show
>>lc_ctype", but that's not in existing releases...)
>>
>>			regards, tom lane
>>    
>>
>
> -- 
>
> / _______________________________
> //Jodi L Kanter
(Continue reading)

Ramesh PAtel | 1 May 2003 08:35
Picon
Picon

Date Problem

Hi All

now Problem is 

I have to date  From = '2003-04-01' and To='2003-05-12'
now i want to use  use date butween  From and To.
and each date one bye one use in query. so how to 

i  increse date one bye one

Please Help me.

Ramesh Patel

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Hargobind Singh | 1 May 2003 09:31

Re: Date Problem

Can u plz. elaborate that what do you want to do ? do you want a new date in
each row,, or u want to run updaet query or what ?

Hargobind Singh
--------------------------
Software Project Manager,
ACPL Exports,
132, Industrial Estate, Nunhai,
Agra - 282 006 (India)
Tel: +91 562 2280870-1-2
Fax: +91 562 2344243
----- Original Message -----
From: "Ramesh PAtel " <ramesh <at> banas.guj.nic.in>
To: <pgsql-admin <at> postgresql.org>
Sent: Thursday, May 01, 2003 12:05 PM
Subject: [ADMIN] Date Problem

> Hi All
>
> now Problem is
>
> I have to date  From = '2003-04-01' and To='2003-05-12'
> now i want to use  use date butween  From and To.
> and each date one bye one use in query. so how to
>
> i  increse date one bye one
>
> Please Help me.
>
> Ramesh Patel
(Continue reading)

Jean-Michel Chabanne | 1 May 2003 10:00
Picon
Favicon

Re: Date Problem

Ramesh PAtel wrote:

>Hi All
>
>now Problem is 
>
>I have to date  From = '2003-04-01' and To='2003-05-12'
>now i want to use  use date butween  From and To.
>and each date one bye one use in query. so how to 
>
>i  increse date one bye one
>
>Please Help me.
>
>Ramesh Patel
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster
>
>
>  
>
You may do this :

 SELECT DATE (DATE '2003-04-01' + INTERVAL '24:00:00');

or build a PL/PGSQL function as this :

 CREATE FUNCTION onedaymore(DATE) RETURNS DATE AS '
(Continue reading)

Ramesh PAtel | 1 May 2003 13:28
Picon
Picon

Problem in FOR loop

Hi All

please give one  help

I want to us date variable in for loop Condition. in PHP

But it not working Properly.
$dt='2003-04-22' ;
$to='2003-04-30';

FOR ( $dt=$dt; $dt > $to ;  )
{
print "XYz";
}

Please Help me 

and how to file date diff in Day please Help

Ramesh Patel

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo <at> postgresql.org

Ramesh PAtel | 1 May 2003 13:30
Picon
Picon

DAte use in For loop

Hi All

please give one  help

I want to us date variable in for loop Condition. in PHP

But it not working Properly.
$dt='2003-04-22' ;
$to='2003-04-30';

FOR ( $dt=$dt; $dt > $to ;  )
{
print "XYz";
}

Please Help me 

and how to file date diff in Day please Help

Ramesh Patel

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo <at> postgresql.org)

dlangschied | 1 May 2003 18:21
Picon

Adding a field to an existing table.

Hi again,
I want to know if it is possible to add a field to an existing table.  I
know I can drop the table and add it back, but that may not always be
desireable.  I am trying to convert a Progress database to postgres.  The
sequences are separate from the tables in Progress and they are serial
fields in postgres.  The easiest solution is to add the sequences as serial
fields to the postgres database, after the tables have been created.  This
would certainly be a pain in the #*#^$& if I had to create these serial
fields when I create the table.  I am trying to achieve a totally hands off
conversion of the database, but this particular issue has me concerned.

Sincerely,

David Langschied
Langschied Consulting Services
25644 Mackinac
Roseville, MI 48066

Phone:  (586)777-7542
Cell:      (248)789-8493
e-mail:  dlangschied <at> ameritech.net

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

dlangschied | 1 May 2003 18:31
Picon

Adding a field to an existing table.

Hi!
I found the doc on sequences and this will work for me.  I am still curious,
however, if you can simply add a field to a table without first dropping it.

Sincerely,

David Langschied
Langschied Consulting Services
25644 Mackinac
Roseville, MI 48066

Phone:  (586)777-7542
Cell:      (248)789-8493
e-mail:  dlangschied <at> ameritech.net

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html


Gmane