[GENERAL] Postgresql Page Layout details

2008-03-05 Thread Najib Abi Fadel
Dear all, i was reading the postgres docs concerning the Database Physical Storage. I found that the information present there is not enough to satisfy my curiosity. Are there any documentation out there that describes in more details the Database Physical Storage of potgres ? In the Page Layout

Re: [GENERAL] I'm in need of something that should be there

2008-03-05 Thread John Koller
Ralph Smith wrote: > And should be easier to find in the manual! > > I've looked in many related chapters of the 8.2 manual for a way to > find out > WHY a specific user has access to a database. > > Chapter 5Data Definition > Chapter 18 Database Roles & Privileges > Chapter 20 Client Auth

Re: [GENERAL] ER Diagram design tools (Linux)

2008-03-05 Thread Roderick A. Anderson
Kevin Kempter wrote: On Wednesday 05 March 2008 20:33:43 Conor McTernan wrote: I was wondering if anyone knows of any good ER Diagram tools for Postgres that run on Linux. If you're not against paying there is dbwrench . Java so it could be a bit of a problem because

Re: [GENERAL] indexing - creates problem

2008-03-05 Thread sathiya psql
now it is for 500 records. postgres 7.4 Debian -- call_id | integer | not null default nextval('call_log_seq'::text) agent_id | integer | call_id already has index. count(*

Re: [GENERAL] ER Diagram design tools (Linux)

2008-03-05 Thread Phil Rhoades
People, On Wed, 2008-03-05 at 20:56 -0700, Kevin Kempter wrote: > On Wednesday 05 March 2008 20:33:43 Conor McTernan wrote: > > I was wondering if anyone knows of any good ER Diagram tools for > > Postgres that run on Linux. > > > > I have been using DBDesigner by FabForce for a couple of years,

Re: [GENERAL] ER Diagram design tools (Linux)

2008-03-05 Thread Kevin Kempter
On Wednesday 05 March 2008 20:33:43 Conor McTernan wrote: > I was wondering if anyone knows of any good ER Diagram tools for > Postgres that run on Linux. > > I have been using DBDesigner by FabForce for a couple of years, but > development has stopped while MySQL workbench is being built (for > wi

[GENERAL] ER Diagram design tools (Linux)

2008-03-05 Thread Conor McTernan
I was wondering if anyone knows of any good ER Diagram tools for Postgres that run on Linux. I have been using DBDesigner by FabForce for a couple of years, but development has stopped while MySQL workbench is being built (for windows only). Neither of these applications will talk to Postgres and

Re: [GENERAL] Constraint name for named NOT NULL constraints is ignored

2008-03-05 Thread Bruce Momjian
Csaba Nagy wrote: > While upgrading our schema between application versions, we also had a > few constraint changes. Some of those changes were dropping NOT NULL > constraints on some columns. Our schema had a few such NOT NULL > constraints, which were created using the named variant of the column

[GENERAL] I'm in need of something that should be there

2008-03-05 Thread Ralph Smith
And should be easier to find in the manual! I've looked in many related chapters of the 8.2 manual for a way to find out WHY a specific user has access to a database. Chapter 5Data Definition Chapter 18 Database Roles & Privileges Chapter 20 Client Authorization postgres=# select * fro

Re: [GENERAL] Changing column names in tables 2

2008-03-05 Thread dmp
Hello Tony, Perhaps this will help maybe not. Since the original data import used quotes for the fields then any case was maintained in the creation of the new table(s) & fields(s). Just take your original import file and remove all the quotes, ",. Re-import and and PostgreSQL will use all lowerca

Re: [GENERAL] Requiring a password

2008-03-05 Thread Tom Lane
"Andrej Ricnik-Bay" <[EMAIL PROTECTED]> writes: > On 06/03/2008, Ralph Smith <[EMAIL PROTECTED]> wrote: >> Even after reloading and restarting the DB, which shouldn't be necessary, >> smithrn still gets in w/o any password checks. >> How come? > Impossible to answer w/o knowing any entries in your

Re: [GENERAL] Changing column names in tables 2

2008-03-05 Thread Alvaro Herrera
Tony Cade wrote: > There are too many fields to issue alter table commands to rename in SQL so > my question is , is it safe to use a query such as > > select relfilenode from pg_class where relname='rates' > update pg_attribute set attname=lower(attname) where attnum >0 and > attrelid=

[GENERAL] Changing column names in tables

2008-03-05 Thread Tony Cade
I have an Access database that I have exported to PostgreSQL via ODBC, which has worked ok & the data is in PostgreSQL but some of the column names were in mixed case e.g. AccountCode When I look at the table definitions in pgadmin these are shown in quotes e.g."AccountCode" and any queries made t

[GENERAL] Changing column names in tables 2

2008-03-05 Thread Tony Cade
Sorry about the earlier incomplete message, this is the complete version I have an Access database that I have exported to PostgreSQL via ODBC, which has worked ok & the data is in PostgreSQL but some of the column names were in mixed case e.g. AccountCode When I look at the table definitions in

Re: [GENERAL] Requiring a password

2008-03-05 Thread Andrej Ricnik-Bay
On 06/03/2008, Ralph Smith <[EMAIL PROTECTED]> wrote: > I guess I'm missing something. > > Question part A) > > Even after reloading and restarting the DB, which shouldn't be necessary, > smithrn still gets in w/o any password checks. > How come? Impossible to answer w/o knowing any entries in your

[GENERAL] Fwd: Requiring a password

2008-03-05 Thread Ralph Smith
I guess I'm missing something. Question part A) I have smithrn in ident.conf, and he can now connect as user airburst to same-named DB. I tested and before he couldn't. But when i: ALTER ROLE airburst WITH UNENCRYPTED PASSWORD 'maxwellsmart' ; ALTER ROLE Even after reloading and restarting

[GENERAL] Requiring a password

2008-03-05 Thread Ralph Smith
I guess I'm missing something. Question part A) I have smithrn in ident.conf, and he can now connect as user airburst to same-named DB. I tested and before he couldn't. But when i: ALTER ROLE airburst WITH UNENCRYPTED PASSWORD 'maxwellsmart' ; ALTER ROLE Even after reloading and restarting

Re: [GENERAL] indexing - creates problem

2008-03-05 Thread tv
> I am having a table with more than 1000 records, i am not having index in > that, while executing that query it occupies the processor.. 1000 rows is not much - I guess the index is not necessary at all, as the traditional sequential scan is faster than index scan (due to random access vs. seque

Re: [GENERAL] Import file into bytea field in SQL/plpgsql?

2008-03-05 Thread Douglas McNaught
On 3/5/08, Erwin Brandstetter <[EMAIL PROTECTED]> wrote: > The whole concept behind large objects is a bit off. Since we have > TOAST tables, it is of limited use to store large objects away in a > system table. It would be useful to have (additional) functions like: >lo_import(text) RETURNS

Re: [GENERAL] Import file into bytea field in SQL/plpgsql?

2008-03-05 Thread Erwin Brandstetter
On Mar 5, 10:20 am, [EMAIL PROTECTED] (Richard Huxton) wrote: > Erwin Brandstetter wrote: > > Hi! > > > What I want to do: > > Import a file from the file system into a bytea field of a table. (...) > Not that I know of. It's simple enough to do from the application side > of things of course (well

Re: [GENERAL] how do you write aggregate function

2008-03-05 Thread Justin
Thank you i was looking for examples and never thought to look at the user comments. I searched the help files several times but never thought to look at the user comment help online. the help coming that comes with PGAdmin III does not have the user comments. once i get the aggregate func

Re: [GENERAL] PostgreSQL vs. MySQL benchmarks on SMP FreeBSD 7.0

2008-03-05 Thread Greg Smith
On Wed, 5 Mar 2008, [EMAIL PROTECTED] wrote: b) PostgreSQL is in general 35%-45% faster. And this is using sysbench, which is an old MySQL benchmark with rudimentary PostgreSQL support bolted on. Last time I checked it didn't even put statements into transaction blocks correctly under Postg

[GENERAL] indexing - creates problem

2008-03-05 Thread sathiya psql
I am having a table with more than 1000 records, i am not having index in that, while executing that query it occupies the processor.. I created an index, and then executed that query., Now it is not getting executed at all... while seeing the top the processor is busy in WA, that it is waiting fo

Re: [GENERAL] [DOCS] Documenting a DB schema

2008-03-05 Thread David Fetter
On Tue, Mar 04, 2008 at 12:02:27PM -0800, Shahaf Abileah wrote: > I'm looking for a systematic way to document the schema for the database > behind our website (www.redfin.com ), so that > the developers using this database have a better idea what all the > tables and colum

[GENERAL] executing query results withing psql

2008-03-05 Thread Reece Hart
Is there a way to generate and directly execute query results within psql? Essentially, I want eval within psql. For example, a lot of us generate DDL commands using queries, like this: => SELECT 'GRANT SELECT ON VIEW "'||table_schema||'.'|| table_name||'" TO budget_view;'

[GENERAL] PostgreSQL vs. MySQL benchmarks on SMP FreeBSD 7.0

2008-03-05 Thread [EMAIL PROTECTED]
Apologizes if this has already been announced - http://www.scribd.com/doc/551889/Introducing-Freebsd-70 a presentation of the SMP in FreeBSD 7.0 using PostgreSQL and MySQL to produce benchmarks. Notable quotes - a) MySQL degrades after utilizing all CPUs, while PostgreSQL does not (the explana

Re: [GENERAL] how do you write aggregate function

2008-03-05 Thread btober
Richard Broersma wrote: On Tue, Mar 4, 2008 at 8:44 AM, Justin <[EMAIL PROTECTED]> wrote: I searched the archive of the mail list and did not find anything Search the documentation. There are a couple great examples posted at http://www.postgresql.org/docs/8.0/interactive/sql-createaggregate

Re: [GENERAL] Find Number Of Sundays Between Two Dates

2008-03-05 Thread Dawid Kuroczko
On 3/5/08, A. Kretschmer <[EMAIL PROTECTED]> wrote: > With generate_series() i generate a list of dates, and later i check if > the date are a saturday. Okay, you need to know sunday -> change from 6 > to 0 and ou course, you can calculate the parameter for the > generate_series like I find it

[GENERAL] JOIN and difference between timestamps

2008-03-05 Thread Conor McTernan
I'm trying to find a count of records based on a number of factors, one of them being that records in different tables have been created within 1 hour of each other. The tables in question look like this: character_tbl Column |Type | Modifiers ---+-

[GENERAL] PostgreSQL UK Conference 2008

2008-03-05 Thread Dave Page
The first UK PostgreSQL Conference will be held on 2nd April 2008 in Birmingham, United Kingdom. The schedule for the day includes talks from a variety of PostgreSQL community members, users and companies, including: * Simon Riggs, author of PITR and partitioning in Postgres - speaking on PostgreS

Re: [GENERAL] Terminal completion

2008-03-05 Thread Emmanuel Quevillon
Richard Huxton wrote: Emmanuel Quevillon wrote: Hi, I have a basic question about pg client. I know it is possible to let pg complete the name of a table by pressing the arrow key. It's the Tab key by default, which might be what you're referring to. Yep. > But unfortunately I can't do i

Re: [GENERAL] Terminal completion

2008-03-05 Thread Richard Huxton
Emmanuel Quevillon wrote: Hi, I have a basic question about pg client. I know it is possible to let pg complete the name of a table by pressing the arrow key. It's the Tab key by default, which might be what you're referring to. I can't remember what (if anything) French keyboards have on th

[GENERAL] Terminal completion

2008-03-05 Thread Emmanuel Quevillon
Hi, I have a basic question about pg client. I know it is possible to let pg complete the name of a table by pressing the arrow key. But unfortunately I can't do it while I am connected to pg (8.2) from a gnome terminal. Also the history does not work for me when I press up arraow key. Is th

Re: [GENERAL] Import file into bytea field in SQL/plpgsql?

2008-03-05 Thread Richard Huxton
Erwin Brandstetter wrote: Hi! What I want to do: Import a file from the file system into a bytea field of a table. Now, I could copy over from pg_largeobject: And create a large object and export from there as above. But that seems unnecessarily complex, and .. well .. stupid. There must

Re: [GENERAL] Meaning og Logs

2008-03-05 Thread Richard Huxton
Please don't start a new message by replying to someone else's message. If you are going to, trim their message body from your message. Suresh Gupta VG wrote: I got the logs as below from log file of PGSQL 7.4.2 on Solaris-9. Can any one please give the exact meaning of it. And I have not found

Re: [GENERAL] Question about PostgreSQL's bytea compatibility with MS Access as front-end

2008-03-05 Thread Richard Huxton
Kristina Yamamoto wrote: We decided to migrate the database to PostgreSQL, because of the ability to still use Access as the front-end (there are forms, queries, etc that are easier for the volunteers to use in Access than learning SQL.) We bought the DBConvert program, which stores the photos i

[GENERAL] Meaning og Logs

2008-03-05 Thread Suresh Gupta VG
Hi List, I got the logs as below from log file of PGSQL 7.4.2 on Solaris-9. Can any one please give the exact meaning of it. And I have not found the file any where on the server "00040072". LOG: recycled transaction log file "00040072" And I found most of the logged

Re: [GENERAL] Find Number Of Sundays Between Two Dates

2008-03-05 Thread Garry Saddington
On Wednesday 05 March 2008 06:16, raghukumar wrote: > Hai EverBody, > > Can I know what is the query by which we can find the number of > sundays between two given dates in postgres > > Thanks In Advance, > Raghu... I think the easiest way is to set up a table populated with all dates a