[GENERAL] How many rows if limit wasn't present?

2005-05-13 Thread Victor Spång Arthursson
LIMIT- clause, and to get the actual result (before pagination) I have to run the query one more time… Big slow down… Thanks in advance, Victor Spång Arthursson ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ?

[GENERAL] Huge problem with upper/lower and foreign chars

2005-05-13 Thread Victor Spång Arthursson
st åÄöØ') Result: ?column?upper lower test åÄöØTEST åÄöØtest åÄöØ This makes searches impossible for me, since postgres is case sensitive… I would really really appreciate some input on this matter… Best regards, Victor Spång Arthursson --

Re: [GENERAL] How many rows if limit wasn't present?

2005-05-13 Thread Victor Spång Arthursson
13 maj 2005 kl. 14.45 skrev Richard Huxton: Richard Huxton wrote: Victor Spång Arthursson wrote: Ciao! Is it possible to get the number of rows that would have been returned if the LIMIT-clause weren't present in some way after the query was run? Reason for asking is that I have a r

[GENERAL] Help with strange join

2005-02-04 Thread Victor Spång Arthursson
dients that is returned (after joining ingredients with languages) is the same as the number of entrys in the table "related_ingredients". Since I'm really close to deadline on this project and standing still for the moment, I really would appreciate some help right now... Best reg

Re: [GENERAL] Help with strange join

2005-02-04 Thread Victor Spång Arthursson
y translated) on receiptnumber = othertable.receipt"… Thanks in advance, Victor Spång Arthursson Denmark / Sweden ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [GENERAL] Help with strange join

2005-02-07 Thread Victor Spång Arthursson
(DIStINCT l.lang) = 1); Hi and thanks for your answer! Could you please try to break this SQL down and try to explain what it does, and also show how to change language… Sincerely Victor Spång Arthursson ---(end of broadcast)--- TIP 8: explain analyze

[GENERAL] Newbie-question

2003-10-28 Thread Victor Spång Arthursson
Are presently converting from mysql to postgresql, and my first newbiequestion is how to make all the rows in a result from a select just "swosh" by? That is, I dont want to see them page for page; just to scroll by so I can se the last line with the number of corresponding rows. And is there

Re: [GENERAL] Newbie-question

2003-10-28 Thread Victor Spång Arthursson
2003-10-28 kl. 14.33 skrev Jeff: 1. in psql, \pset pager will turn paging off. Although, if you really want a row count, a much better way to do that is select count(*) from [rest of select statement] Thanks. I'm not new to SQL, just to postgresql, so I know about the Count-function ;) Reason

[GENERAL] Where are the database files located?

2003-10-31 Thread Victor Spång Arthursson
Well, bought a new disk to my Powerbook yesterday and reinstalled Mac OS X. I'm in the middle of restoring everything now, and need to know where the database files where located. I thougt /usr/local/pgsql/data would be the appropriate place, but can't find anything there that makes sense… Reg

[GENERAL] Very strange selectproblem

2003-11-04 Thread Victor Spång Arthursson
Can't select 3 columns from a table called varer. The columns are the three first and are called vnummer, puNr and dNr. The error message is: indiadan=# select varer.vNummer from varer; ERROR: No such attribute varer.vnummer indiadan=# I'm probably doing something else wrong, but can't figure w

[GENERAL] problems dumping from one server 2 another

2004-01-09 Thread Victor Spång Arthursson
Hi! Can't get the sudo -u user1 /usr/local/bin/pg_dump db1 | /usr/local/bin/psql -U user2 -h host2 db2 to work. Only thing that happens is that I get multiple passwordprompts, and then I gets told that the password is incorrect… Would appreciate quick help, sincerely Victor

Re: [GENERAL] problems dumping from one server 2 another

2004-01-12 Thread Victor Spång Arthursson
2004-01-10 kl. 00.21 skrev Richard Huxton: Can't get the sudo -u user1 /usr/local/bin/pg_dump db1 | /usr/local/bin/psql -U user2 -h host2 db2 to work. Only thing that happens is that I get multiple passwordprompts, and then I gets told that the password is incorrect… You probably want a .pgpas

[GENERAL] Dump tables with pg_dump - no or different Owner

2004-01-12 Thread Victor Spång Arthursson
Hi! Have a problem, probably easy to solve... I want to dump a database which resides on my local server with another, and not existing, owner than the one who actually owns it locally. The beginning of the dump file looks like: \connect - postgres SET search_path = public, pg_catalog

[GENERAL] Foreign key question

2004-01-15 Thread Victor Spång Arthursson
New to foreign keys and have some questions… The first is, i have a language table with a primary key on the fields lang and relid: relid | lang |text ---+--+- 1 | uk | hello 1 | dk | hej 1 | de | guten tag 2 | uk | world 2 | dk | værld

[GENERAL] convert result to uppercase

2004-04-20 Thread Victor Spång Arthursson
Hi! How do i convert a result to upper/lowercase? I'ld like to do the following: SELECT UPPER(lang) from languages; and get for example "uk" as "UK", "dk" AS "DK" and so on… Sincerely Victor ---(end of broadcast)--- TIP 7: don't forget to incre

[GENERAL] ORDER BY 'DK', 'DE', DESC?

2004-05-20 Thread Victor Spång Arthursson
Hi! I would like to know if it's possible to give a priority order of how to sort the returning rows? Like for example to order every row with a field language = DK first, then the rows with field language = *DE' and last the other languages, ordered alphabetically…? Sincerely Victor -

[GENERAL] Equivalent for mysql's FOUND_ROWS()

2004-05-20 Thread Victor Spång Arthursson
With mysql it's possible to add a parameter "SQL_CALC_FOUND_ROWS" to the selectstatement and then after having made a query to the database with a limit clause you can fire off a second query, "SELECT found_rows() as numberofrows" to get the number of rows the query would have returned without