On Fri, Mar 03, 2006 at 08:47:00AM +0100, Dragan Matic wrote:
> create table sample(column_sample varchar(500))
>
> insert into sample(column_sample) values('this is first row of text' ||
> chr(10) || 'this is second row of text')
>
> Now, instead of just inserting chr(10), postgres inserts chr(
On fim, 2006-03-02 at 11:03 -0700, Rick Gigger wrote:
> Never-mind that. I'm assuming statement_timeout is what I need?
Yes, but take care if you change this in postgresql.conf:
some queries might reasonaby be expected to take longer
than 5 minutes, such as VACUUM.
gnari
> On Mar 2, 2006, at 1
Hi,I've created a table like this : CREATE TABLE tmp_A (c "char",i int4);And another one CREATE TABLE tmp_B (i int4,
ii int4);I then inserted a bit more than 19 million rows in each table (exactly the same number of rows in each).
The end result is that the physical size on disk used by table tmp_
Oh that will abort vacuum after that time as well? Can anyone
confirm that this is the case? There shouldn't be ANY queries that
take that long and if there are then can manually set the parameter
when those requests happen. I would prefer to limit by default and
allow longer queries onl
Michael Fuhr wrote:
On Thu, Mar 02, 2006 at 05:17:12PM +0100, DANTE ALEXANDRA wrote:
We have a question concerning backup / restore of database.
Is it right if we say that for having a complete backup, we have do :
1. use pg_dumpall
2. do a backup of the modified "template1" database with pg
I asked the same question some time ago, and IIRC the answer was that
the statement timeout only applies to interactive sessions. So
autovacuum would not be affected, but a vacuum run through psql yes.
You can also set it for a user (see "alter user ... set ..."), and use
separate users for applica
Am Freitag, 3. März 2006 11:03 schrieb Paul Mackay:
> I've created a table like this :
> CREATE TABLE tmp_A (
> c "char",
> i int4
> );
>
> And another one
> CREATE TABLE tmp_B (
> i int4,
> ii int4
> );
> The end result is that the physical size on disk used by table tmp_A is
> exactly the same a
On Fri, Mar 03, 2006 at 11:03:24AM +0100, Paul Mackay wrote:
> The end result is that the physical size on disk used by table tmp_A is
> exactly the same as table tmp_B (as revealed by the pg_relation_size
> function) ! Given that a "char" field is supposed to be 1 byte in size and a
> int4 4 bytes
On fös, 2006-03-03 at 11:03 +0100, Paul Mackay wrote:
> Hi,
>
> I've created a table like this :
> CREATE TABLE tmp_A (
> c "char",
> i int4
> );
>
> And another one
> CREATE TABLE tmp_B (
> i int4,
> ii int4
> );
>
> I then inserted a bit more than 19 million rows in each table (exactly
> th
Hello Tom, hello List,
Sorry if we haven't been clear in our first mail.
We don't really understand your answer.
So, we try to clarify our general question and give more details :
When we go on the web site to download PostgreSQL 8.1.2,
we find not only the serveur rpm but also some others rpms.
Hi,
Is it possible using tsearch2 to match a substring of an element of a ts_vec
column?
For example: I have a table with a ts_vec, and I have a field with text, and
if there is a value in the field "I would like to match the beginning of the
words" - and the ts_vec has " 'like':3 'match':5 'beg
>Yes. Your server must be PG 8.0 or 8.1. Using the "-i" switch to override
pg_dump's version check is hardly ever a good idea --- instead, find a newer
>version of pg_dump.
Sorry, my mistake.
Actually I am using PostgreSQL 8.0.3, but pg_dump is 7.3.10-RH !
So, is there a way to get a newer ver
Andrew Watkins <[EMAIL PROTECTED]> writes:
> Thanks. I suppose my question is less about the mechanisms for
> actually starting the servers and more about where to install the
> servers, where they should be running, etc. For example, if I'm using
> a shared file system across each node in the clu
Michael Fuhr <[EMAIL PROTECTED]> writes:
> On Fri, Mar 03, 2006 at 05:46:59PM +1100, Chris wrote:
>> If I look at an index:
>> It doesn't show me which fields it actually applies to, only the table.
> \d news_pkey
Also, \d on the index's parent table will show you all the index
definitions. Thi
Peter Eisentraut <[EMAIL PROTECTED]> writes:
> An int4 field is required to be aligned at a 4-byte boundary internally, so
> there are 3 bytes wasted between tmp_A.c and tmp_A.i. If you switch the
> order of the fields you should see space savings.
Probably not, because the row-as-a-whole has a
Dragan Matic <[EMAIL PROTECTED]> writes:
> create table sample(column_sample varchar(500))
> insert into sample(column_sample) values('this is first row of text' ||
> chr(10) || 'this is second row of text')
> Now, instead of just inserting chr(10), postgres inserts chr(13) +
> chr(10).
Postgre
Hi Tom,
> Hmm. That seems like a SELinux policy bug. It doesn't happen for me:
> the pid file is created with the same context the other files have.
I agree! I have the latest FC4 policy update. So I downloaded the
sources as the new one didn't solve the issue. The policy source has
no mention
words" - and the ts_vec has " 'like':3 'match':5 'begin':7 ...etc" then it
would be cool to create a query, which give me a headline for "begin" if I
just use the "beg" (or "beg*" ) search expression.
Potentially yes, but without index support and it's needed to write your
operator/function.
I just finished installing the PGDG rpms on my second server. This one
is a single CPU Opteron with 2 SATA based RAID5 arrays. (Just to clear
things up, I know RAID5 is bad for postgres, but this is a storage
server that has postgres only as a backup for the main machine.)
The problem diesn'[t hap
>What's that "datpath" about? Is it a version problem? postgres (PostgreSQL)
7.3.10-RH
Just set up a new postgres on another server. Restoring my dump and then
trying pg_dump again.
Here's the result:
pg_dump mpv
pg_dump: server version: PostgreSQL 8.1.3 on i686-pc-linux-gnu, compiled by
GCC gcc
Hi,
i want to calculate the price difference, change% of 2 price records. Is
there an easy way to do that within one query, rather than writing a
function?
Example:
company, price_date, price, change, change_perc
compA, 20060203,100,,,
compA, 20060202,100,,,
compA, 20060201,100,,,
for one, i
I'm new to pgSQL and I'm having some trouble with a
function. I keep getting the following error:
org.postgresql.util.PSQLException: ERROR: cursor
"" does not exist
This is the function:
CREATE OR REPLACE FUNCTION ret_user(pusername
"varchar")
RETURNS refcursor AS
$BODY$
DECLARE
ccursor re
On Fri, 2006-03-03 at 10:38, Sascha Nepper wrote:
> >What's that "datpath" about? Is it a version problem? postgres (PostgreSQL)
> 7.3.10-RH
>
> Just set up a new postgres on another server. Restoring my dump and then
> trying pg_dump again.
>
> Here's the result:
>
> pg_dump mpv
> pg_dump: serv
On Sat, Mar 04, 2006 at 03:35:02 +1100,
Alex <[EMAIL PROTECTED]> wrote:
> Hi,
> i want to calculate the price difference, change% of 2 price records. Is
> there an easy way to do that within one query, rather than writing a
> function?
You can use a self join to do this. It won't be spectacula
On Fri, Mar 03, 2006 at 11:06:20AM -0600, Eduardo Muñoz wrote:
> I'm new to pgSQL and I'm having some trouble with a
> function. I keep getting the following error:
>
> org.postgresql.util.PSQLException: ERROR: cursor
> "" does not exist
See my reply to your previous message about this:
http://a
How can I possible to find out what table a record belong to from record's oid?
Thanks
Yudie
On Fri, Mar 03, 2006 at 11:31:40AM -0600, Yudie Pg wrote:
> How can I possible to find out what table a record belong to from record's
> oid?
You can't. An OID doesn't identify the record since it's not guarenteed
to be unique (usually). In a query you can use tableoid but that's
about it.
Hope t
On Fri, Mar 03, 2006 at 11:31:40AM -0600, Yudie Pg wrote:
> How can I possible to find out what table a record belong to
> from record's oid?
You can't, short of querying every table that has an oid column.
However, you could determine the table from the record's tableoid
column.
Where are you ge
Hello Teodor,
Friday, March 3, 2006, 5:09:45 PM, you wrote:
>> words" - and the ts_vec has " 'like':3 'match':5 'begin':7 ...etc" then it
>> would be cool to create a query, which give me a headline for "begin" if I
>> just use the "beg" (or "beg*" ) search expression.
> Potentially yes, but wit
Hello All,Suppose there 3 users red, green, blue. How can the user green know what tables he has created?!From psql command line \dt lists every table in the DB!!!Thanks in advance.Hrishi
Hrishikesh Deshmukh wrote:
Hello All,
Suppose there 3 users red, green, blue. How can the user green know what
tables he has created?!
From psql command line \dt lists every table in the DB!!!
Thanks in advance.
Hrishi
If you mean that the owner of the table(s) is the user "green", then tr
I assume that running the vacuumdb command is the same as running it
through psql?
On Mar 3, 2006, at 3:14 AM, Csaba Nagy wrote:
I asked the same question some time ago, and IIRC the answer was that
the statement timeout only applies to interactive sessions. So
autovacuum would not be affecte
I've got some new content on my wiki for PostgreSQL.
http://www.bluwiki.org/go/PostgreSQL_Tips_From_The_Sunburned_Surveyor
You will find an article on making connections to the PostgreSQL
server, and an article on creating automated backups of PostgreSQL
databases using a bash shell script.
Thes
On 3/3/06, Agnes Bocchino <[EMAIL PROTECTED]> wrote:
> Hello Tom, hello List,
>
> Sorry if we haven't been clear in our first mail.
> We don't really understand your answer.
> So, we try to clarify our general question and give more details :
>
> When we go on the web site to download PostgreSQL 8.
I hope I am reporting this in the right forum, if not please tell me so
and next time I'll be better.
There might be a problem with a missing extension in the pre-compiled
windows version of Postgres 8.1
It looks as though it's the 'MemoryContextSwitchTo' library which is
present in 8.0 but mi
Is there way to determine the table a query or a view's columns come from?
I am looking for something like that in postgresql. If it doesn't exist is there
some generalized SQL that can parse the query or view's definition and retrieve
the list.
something like
column name | actual column name |
Frank Church <[EMAIL PROTECTED]> writes:
> Is there way to determine the table a query or a view's columns come from?
Yeah, there's some support for that in the protocol. libpq exposes it
as PQftable() and PQftablecol().
regards, tom lane
---(end
On Mar 4, 2006, at 7:04 , Redefined Horizons wrote:
P.S. - I still have some sections to complete on the article about
automatic backups. I was also wondering, what is the -c switch used
for? What type of custom format would you export in a postgreSQL
backup?
Are you referring to the -Fc flag
Michael Fuhr's example of using composite types for date intervals/
ranges/periods prompted me to explore this a little further. While
doing so, it appears that one can't directly access the columns of a
composite type when creating an index, i.e., neither UNIQUE (foo.bar)
nor UNIQUE ((foo).
What encoding did you initdb with?
On Thu, Mar 02, 2006 at 04:59:39PM +0200, Anakreon Mendis wrote:
> The table:
> CREATE TABLE DILOSIS (
> DL_AEM INT NOT NULL,
> DL_CODE VARCHAR(6) NOT NULL,
> DL_YEAR INT NOT NULL,
> DL_GRADE FLOAT(3) NOT NULL,
> DL_LESTYPE INT NOT N
On Thu, Mar 02, 2006 at 12:30:32PM -0500, Reid Thompson wrote:
> Hi all,
> I'm querying for feedback/comments. Wondering what the list thinks of
> the following.
>
> Assume this is to provide a production database for a small company or a
> department. Production hours 5am-9pm for the most par
On Thu, Mar 02, 2006 at 03:45:01PM -0500, Oisin Glynn wrote:
> I have a seperate schema with a function and table. The function does a
> select on the table.
> The table and function exist in public schema and betteridea schema. I
> have a user betteridea who owns the betteridea schema.
> If I
[Please copy the mailing list on replies.]
On Fri, Mar 03, 2006 at 01:42:15PM -0600, Yudie Pg wrote:
> I was trying to make a indexing table that use fulltext indexing that could
> store all string values from the other tables in the database.
> I hope that can use record oid as the key and can be
Michael Glaesemann <[EMAIL PROTECTED]> writes:
> ... it appears that one can't directly access the columns of a
> composite type when creating an index, i.e., neither UNIQUE (foo.bar)
> nor UNIQUE ((foo).bar) work.
You need both, ie something like
create table foo (bar date_co_interval);
crea
On Sat, Mar 04, 2006 at 12:21:38PM +0900, Michael Glaesemann wrote:
> create unique index employment_history_pkey_idx
> on employment_history (company, (during).from_date, (during).to_date);
> ERROR: syntax error at or near "." at character 89
> LINE 2: on employment_history (company, (during).fro
On Mar 4, 2006, at 13:34 , Michael Fuhr wrote:
On Sat, Mar 04, 2006 at 12:21:38PM +0900, Michael Glaesemann wrote:
create unique index employment_history_pkey_idx
on employment_history (company, (during).from_date,
(during).to_date);
ERROR: syntax error at or near "." at character 89
LINE
On Mar 4, 2006, at 13:44 , Michael Glaesemann wrote:
On Mar 4, 2006, at 13:31 , Tom Lane wrote:
Make sense now?
Yep!
Except, why doesn't it work in the CREATE TABLE statement? One needs
to add the UNIQUE index as a separate command. For example,
-- doesn't work
create table foo
(
Michael Glaesemann <[EMAIL PROTECTED]> writes:
> Except, why doesn't it work in the CREATE TABLE statement?
The UNIQUE/PRIMARY KEY syntax only allows bare column names, per the SQL
standard. While there's not any technical reason why we couldn't extend
that syntax, there's a pretty large fear fac
On Mar 4, 2006, at 14:17 , Tom Lane wrote:
The UNIQUE/PRIMARY KEY syntax only allows bare column names, per
the SQL
standard. While there's not any technical reason why we couldn't
extend
that syntax, there's a pretty large fear factor involved: we could
find
ourselves behind the spec-co
On Friday 03 March 2006 23:04, Redefined Horizons wrote:
>I've got some new content on my wiki for PostgreSQL.
>
>http://www.bluwiki.org/go/PostgreSQL_Tips_From_The_Sunburned_Surveyor
>
>You will find an article on making connections to the PostgreSQL
>server, and an article on creating automated b
50 matches
Mail list logo