Re: [GENERAL] ordered pg_dump

2008-11-10 Thread Josh Williams
has been brought up before, but I couldn't find the thread, > so I don't know what conclusion was reached. > > Regards, > Jeff Davis (... Plus, you potentially get a free CLUSTER on a reload.) - Josh Williams -- Sent via pgsql-general mailing list (pgsql-g

Re: [GENERAL] psql: what's the SQL to compute the ratio of table sizes?

2008-10-21 Thread Josh Williams
make sure to cast to avoid integer division (well, assuming you want to avoid it...) SELECT (SELECT COUNT(*) FROM tablex)::numeric / (SELECT COUNT(*) FROM tabley)::numeric AS ratio; - Josh Williams -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your sub

Re: [GENERAL] schema and roles

2008-10-17 Thread Josh Williams
ts to schemas. [1] http://www.postgresql.org/docs/8.2/interactive/sql-show.html - Josh Williams -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Reg: Permission error in Windows psql while trying to read sql commands from file

2008-10-12 Thread Josh Williams
quotation marks: # \i 'C:/Documents and Settings/All Users/Documents/DB/testdb.txt' > If you could help me on this I would be much obliged.. > > Regards > Raj - Josh Williams -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your su

Re: [GENERAL] Question About UNION

2008-10-09 Thread Josh Williams
ith c or the one with d? > > > > > The physical order that they appear will take care of that. If the rest of the columns don't matter, how about: SELECT DISTINCT ON(col1, col2) * FROM ( SELECT col1, col2, col3 FROM table1 UNION SELECT col1, col2, col3 FROM table2 ORDER BY

Re: [GENERAL] Alter definition of a column

2007-01-20 Thread Josh Williams
So yeah, I don't see any reason it shouldn't work just fine. - Josh Williams ---(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