[ADMIN] How can I set the cross database reference?

2003-12-08 Thread Olivier Hubaut
Hi,

I need to use the cross database reference form some select closes. I've 
install PG 7.3.4 using the 'make all' option, but it seems that the 
functionnality isn't set anyway.

Is there another package I need to install or some commands I need to do?

Thanks,

--
Ci-git une signature avortee.
** RIP **
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
 joining column's datatypes do not match


Re: [ADMIN] find table name

2003-12-08 Thread Thierry Missimilly
Hi the list,

I used to run oid2name to find the relation between database names and
.../data/base/ but i'm interested also to identify relation between table
names, index names and files number as would try to decrease Wait I/O by
setting tables on one disk and indexes on another one.
The tables pg_class and pg_index do not give the symbolic name with the
"numbers".

Thierry Missimilly.



[EMAIL PROTECTED] wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>
> > In postgresql  all databases are stored in /data/base directory in
> > numbers form and all the related tables with that database are stored in
> > that directory again in numbers form.
> > so there is any command or query to see the original table names.
> > just like:-  select * from pg_stat_database; for databases.
>
> You can find the mapping between the "numbers" on disk and the tables by
> looking at the "relfilenode", "relname" and "relkind" columns of the
> pg_class table. However, it is best to not mess with those files at
> all. What are you trying to do?
>
> - --
> Greg Sabino Mullane [EMAIL PROTECTED]
> PGP Key: 0x14964AC8 200312070810
>
> -BEGIN PGP SIGNATURE-
>
> iD8DBQE/0yb5vJuQZxSWSsgRAoOMAJ9FZsojXzvCVgrM6Tv0B3f+eI0k8QCg6X8C
> fqQi82DmYdZduq4lwADIou0=
> =92w+
> -END PGP SIGNATURE-
>
> ---(end of broadcast)---
> TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
begin:vcard 
n:Missimilly;Thierry
tel;fax:+33 (0)4 76 29 78 78
tel;work:+33 (0)4 76 29 74 54
x-mozilla-html:FALSE
url:http:\\www.bull.com
org:BIS/R&D
adr:;;Bull SA, 1, rue de provence - BP 208;ECHIROLLES;;38432;FRANCE
version:2.1
email;internet:[EMAIL PROTECTED]
x-mozilla-cpt:;-18184
fn:Thierry Missimilly
end:vcard

---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [ADMIN] Field Size

2003-12-08 Thread Ganesan Kanavathy








Can anyone
tell me, what harm would setting a field size to 1000 characters do to the size?

 

By increasing the size, will the
database require more space? Or does it only consume space if there is data in
the field only?

 

Regards,

Ganesan

 








Re: [ADMIN] Field Size

2003-12-08 Thread Marc A. Leith


If you define the field as CHAR, 1000 bytes will be consumed.



If you define the field as VARCHAR, on sufficient bytes to store the contents will be used.



Marc



--Original Message Text---

From: Ganesan Kanavathy

Date: Mon, 8 Dec 2003 20:56:06 +0800



Clean Clean DocumentEmail MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman";}



Can anyone tell me, what harm would setting a field size to 1000 characters do to the size?  



   



By increasing the size, will the database require more space? Or does it only consume space if there is data in the field only?  



   



Regards,  



Ganesan  



   












Marc A. Leith
President
redboxdata inc.

e-mail: [EMAIL PROTECTED]
cell:(416) 737 0045


Re: [ADMIN] Field Size

2003-12-08 Thread Somasekhar Bangalore








There is no harm in having a field size of 1000 character provided u use
the proper datatype. Don’t user char(1000). Try using varchar(1000).

 

For character data it is recommended to
use the VARCHAR type, since PostgreSQL manages it very well.  On the
contrary, if you use the CHAR datatype, the size you specify for the string is
pre-allocated in the pages and you allocate space which may not be
used.  So your database is bigger than what it should be and
performance is lowered, because this way you need more I/O to read the data.

 

Som

 

-Original
Message-
From: Ganesan Kanavathy
[mailto:[EMAIL PROTECTED]
Sent: Monday, December 08, 2003
6:26 PM
To: [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: [ADMIN] Field Size

 

Can anyone tell me, what harm would setting a field size to 1000 characters do to the size?

 

By
increasing the size, will the database require more space? Or does it only
consume space if there is data in the field only?

 

Regards,



Ganesan



 








[ADMIN] timestamp field

2003-12-08 Thread Ashok Chauhan
hi
there is any command to see the timestamp of any record that is stored
in a table already.
Except that add a field of timestamp type in that table.
plz help me.




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


Re: [ADMIN] timestamp field

2003-12-08 Thread Andrei Bintintan
Hi,

I don't know if there is such a command, with my experience I think there
isn't such one.
Do you need it for all the tables?? Put a field like timestamp and put the
default value: now()... it will update automatically, so you don't have to
bother with it.

Best Regards.
Andy.

- Original Message - 
From: "Ashok Chauhan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 08, 2003 3:21 PM
Subject: [ADMIN] timestamp field


> hi
> there is any command to see the timestamp of any record that is stored
> in a table already.
> Except that add a field of timestamp type in that table.
> plz help me.
>
>
>
>
> ---(end of broadcast)---
> TIP 4: Don't 'kill -9' the postmaster


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


[ADMIN] error in code

2003-12-08 Thread Ashok Chauhan
hi
*
# include 
# include 
# include 
# include 

int main()
{
PGresult *result;
PGconn *conn;
int feild;
conn = PQconnectdb ("ashok");
result = PQexec (conn, "select * from bill");
feild = PQntuples (result);
printf("%d",feild);
PQclear (result);
PQfinish (conn);
printf("hello");
return 1;


}

I make the following code with the make command but give the following
the errors:-

/tmp/ccUWs9W9.o: In function `main':
/tmp/ccUWs9W9.o(.text+0x19): undefined reference to `PQconnectdb'
/tmp/ccUWs9W9.o(.text+0x2f): undefined reference to `PQexec'
/tmp/ccUWs9W9.o(.text+0x40): undefined reference to `PQntuples'
/tmp/ccUWs9W9.o(.text+0x64): undefined reference to `PQclear'
/tmp/ccUWs9W9.o(.text+0x72): undefined reference to `PQfinish'
collect2: ld returned 1 exit status
make: *** [aa] Error 1

plz help me.

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


Re: [ADMIN] error in code

2003-12-08 Thread Oliver Elphick
On Mon, 2003-12-08 at 13:55, Ashok Chauhan wrote:
> I make the following code with the make command but give the following
> the errors:-
> 
> /tmp/ccUWs9W9.o: In function `main':
> /tmp/ccUWs9W9.o(.text+0x19): undefined reference to `PQconnectdb'
> /tmp/ccUWs9W9.o(.text+0x2f): undefined reference to `PQexec'
> /tmp/ccUWs9W9.o(.text+0x40): undefined reference to `PQntuples'
> /tmp/ccUWs9W9.o(.text+0x64): undefined reference to `PQclear'
> /tmp/ccUWs9W9.o(.text+0x72): undefined reference to `PQfinish'
> collect2: ld returned 1 exit status
> make: *** [aa] Error 1

These are link errors.  You need to add -lpq to the link command line
(and possibly -Lpath for the libpq library path as well).

-- 
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
 
 "For I am the LORD your God; ye shall therefore  
  sanctify yourselves, and ye shall be holy; for I am 
  holy."  Leviticus 11:44 


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

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


Re: [ADMIN] timestamp field

2003-12-08 Thread Andrei Bintintan
I never thought of something like this, but it's a good question.
I will look in the next days  to this problem, if I find something I will
post it.

Post on the forum, everyone  may be interested.

Best Regards.
Andy.

- Original Message - 
From: "Ashok Chauhan" <[EMAIL PROTECTED]>
To: "Andrei Bintintan" <[EMAIL PROTECTED]>
Sent: Monday, December 08, 2003 4:01 PM
Subject: Re: [ADMIN] timestamp field


> On Mon, 2003-12-08 at 19:00, Andrei Bintintan wrote:
>
> thanks for reply
> Yes i want for all the tables.
> But the problem is i not change the structure of the tables (means i not
> add the timestamp field in all tables)
> have any solution without adding the field ?
> > Hi,
> >
> > I don't know if there is such a command, with my experience I think
there
> > isn't such one.
> > Do you need it for all the tables?? Put a field like timestamp and put
the
> > default value: now()... it will update automatically, so you don't have
to
> > bother with it.
> >
> > Best Regards.
> > Andy.
> >
> > - Original Message - 
> > From: "Ashok Chauhan" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, December 08, 2003 3:21 PM
> > Subject: [ADMIN] timestamp field
> >
> >
> > > hi
> > > there is any command to see the timestamp of any record that is stored
> > > in a table already.
> > > Except that add a field of timestamp type in that table.
> > > plz help me.
> > >
> > >
> > >
> > >
> > > ---(end of
broadcast)---
> > > TIP 4: Don't 'kill -9' the postmaster
> >
> >
> > ---(end of broadcast)---
> > TIP 2: you can get off all lists at once with the unregister command
> > (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
>


---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [ADMIN] Field Size

2003-12-08 Thread Bruno Wolff III
On Mon, Dec 08, 2003 at 18:36:57 +0530,
  Somasekhar Bangalore <[EMAIL PROTECTED]> wrote:
> There is no harm in having a field size of 1000 character provided u use the proper 
> datatype. Don't user char(1000). Try using varchar(1000).

And if the 1000 limit is just a large number you picked rather than a
real rule for your data, then you probably want to use the TEXT type.

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

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


Re: [ADMIN] Auto commit Off how will it effect us ?

2003-12-08 Thread Robert Treat
I think you have misunderstood... autocommit works as it always has in
7.4, the difference is that the logic to turn it off is now left to the
client side instead of trying to manage it within the server.

ie.

phppgadmin=# select version();
   version   
-
 PostgreSQL 7.4 on i586-pc-linux-gnu, compiled by GCC 2.95.3
(1 row)

phppgadmin=# set autocommit = off;
ERROR:  SET AUTOCOMMIT TO OFF is no longer supported
phppgadmin=# 


Of course PostgreSQL is open source, so I always recommend for folks to
do a test installation and test there apps out just to be on the safe
side.

Robert Treat 

On Sun, 2003-12-07 at 03:54, Sai Hertz And Control Systems wrote:
> Dear all ,
> 
> Permit me to gain some of your most valuable knowledge ...
> 
> Our intrAnet server has the following spec
> 1. RH 9.0
> 2. Postgresql 7.3.4
> 3. PHP 4.3.3
> 4. GCC  3.2.2
> 
> Till date my front end language (PHP) use to simply pass the data to  
> postgresql in case of insert and
> update we were not using
> 1  BEGIN COMMIT block in PHP till date thanks to auto-commit-ON in postgreql
> 2. ROLLBACK script in PHP script
> 
> 
> And now when our company has decided to switch over to  postgresql 7.4  
> we have some doubt
> 1. Do we have to include BEGIN and COMMIT block around the insert 
> process . (Because Postgresql 7.4 has auto-commit-OFF) in our PHP scripts
> 2. Not only this do we also have to port the pgSQL functions which use 
> to do inserts into a third table such that
>   data gets committed on function execution
> 
> 
> Please provide us any kinda information so that we can happily switch to 
> postgressql 7.4
> 
> 
> 
> Regards,
> V Kashyap
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ---(end of broadcast)---
> TIP 7: don't forget to increase your free space map settings

-- 
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL


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


Re: [ADMIN] find table name

2003-12-08 Thread greg

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
 
 
> I used to run oid2name to find the relation between database names and
> .../data/base/ but i'm interested also to identify relation between table
> names, index names and files number as would try to decrease Wait I/O by
> setting tables on one disk and indexes on another one.
> The tables pg_class and pg_index do not give the symbolic name with the
> "numbers".
 
This is probably not what you want to do - there are less drastic ways to
get more performance out of PostgreSQL. One thing you can do is move
your WAL files to a different disk, as they are very heavily accessed.
(this is the pg_xlog directory). There are lots of other things that can
help as well - post your hardware and/or queries to the performance list
and you should get some good responses:
 
http://tinyurl.com/yc2b
 
- --
Greg Sabino Mullane [EMAIL PROTECTED]
PGP Key: 0x14964AC8 200312081935
 
-BEGIN PGP SIGNATURE-
 
iD8DBQE/1RlYvJuQZxSWSsgRAjV4AJ9uvU5e4yStJSWLhEJZXW/TEiiDGgCgmwKM
rymCF633HioUBJQ0Oj0obZg=
=rf6h
-END PGP SIGNATURE-



---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [ADMIN] How can I set the cross database reference?

2003-12-08 Thread Gaetano Mendola
Olivier Hubaut wrote:
Hi,

I need to use the cross database reference form some select closes. I've 
install PG 7.3.4 using the 'make all' option, but it seems that the 
functionnality isn't set anyway.

Is there another package I need to install or some commands I need to do?
You can do db cross select using dblink but I don't think that you
can enforce cross database reference. You can anyway use schemas.
Regards
Gaetano Mendola


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
   (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [ADMIN] How can I set the cross database reference?

2003-12-08 Thread Gaetano Mendola
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Olivier Hubaut wrote:
| Hi,
|
| I need to use the cross database reference form some select closes. I've
| install PG 7.3.4 using the 'make all' option, but it seems that the
| functionnality isn't set anyway.
|
| Is there another package I need to install or some commands I need to do?
You can do db cross select using dblink but I don't think that you
can enforce cross database reference. You can anyway use schemas.
Regards
Gaetano Mendola


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQE/1R5k7UpzwH2SGd4RAmiNAKD6eSxpudqeT1jwVwl6qXrTY0B2UwCdGMbH
zZO9Zhwp5GPjusUHmGW4pgI=
=sM5I
-END PGP SIGNATURE-
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
 joining column's datatypes do not match


[ADMIN] oracle synonyms

2003-12-08 Thread sachdev
Hi,
 I am trying to port from oracle database to postgres. I was not able to
port Oracle synonyms to postgres. I appriciate if anybody can give a
solution.

Thanks and Regards
Sachdev



-
This email was sent using DACafeMail.
Get Your FREE 25 MB eMail Account Now.
http://cafemail.dcccafe.com

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings