I need a function that will transform from the format '2002-09-08
05:29:41' to seconds since 1970.
Thank you.
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
am 01.12.2005, um 11:07:59 +0200 mailte Sterpu Victor folgendes:
> I need a function that will transform from the format '2002-09-08 05:29:41'
> to seconds since 1970.
scholl=# select now();
now
---
2005-12-01 10:18:47.554236+01
(1 row)
scholl=# select
rnd=# select extract(epoch from timestamp '2002-09-08 05:29:41');
date_part
1031477381
(1 row)
See the date/time functions documentation.
On Thursday 01 December 2005 04:07 am, Sterpu Victor saith:
> I need a function that will transform from the format '2002-09-08
> 05:29:41' to s
surabhi.ahuja wrote:
the postgreslog has permission - 777, so anyone is able to write in it.
that s why it is atleast showing
LOG: logger shutting down
but i want more logging to be done ..how can it be done ..
Oh - I thought the message was being echoed to STDERR. You'll still want
to
Title: Re: [GENERAL] postgres log file
how do i "Use the
syslog daemon to record your logs."
thanks,
regards
Surabhi
From: Richard Huxton
[mailto:[EMAIL PROTECTED]Sent: Thu 12/1/2005 3:07 PMTo:
surabhi.ahujaCc: pgsql-general@postgresql.orgSubject: Re:
[GENERAL] postgres log file
***
surabhi.ahuja wrote:
how do i "Use the syslog daemon to record your logs."
See Ch 17.7 of the manuals "Error reporting and logging". You'll want to
set your log_destination to syslog and make sure syslog itself is set up
to route LOCAL0 (or whatever facility you use if you change it).
But
Hi, I'm trying alter a table schema on
'PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.5
(Debian 1:3.3.5-5)'.
On 8.1, by documentation, has the commant
"ALTER TABLE SET SCHEMA ". Any solution
for this in 8.0?
Ps.: solutions different of "CREATE TABLE as SE
Bruno Wolff III wrote:
That changes the semantics of what I want. If I group by personID
above, then every FOUR-way combo is of course unique. What I'd like
to
do is group by the three attributes, and select for personID as well.
But of course you can't select for columns you haven't grouped
On Wed, Nov 30, 2005 at 02:58:15PM -0700, Michael Fuhr wrote:
>
> Shouldn't that be 8.0 and later? That's when savepoints were
> introduced. Or are you referring to something else?
Doh. Indeed. I was _thinking_ os something else, but not referring
to something else.
A
--
Andrew Sullivan |
Hican anybody help with this error, I attatched an imagethanksPosgtrest 8.1.0 on WinXP Pro SP1
error.PNG
Description: PNG image
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail co
don't know if this is the best solution but I dropped the database and recreated it with SQL_ASCII instead of UTF-8 and everything worked as expectedHugoOn 01/12/05,
Hugo <[EMAIL PROTECTED]> wrote:Hi
can anybody help with this error, I attatched an imagethanksPosgtrest 8.1.0 on WinXP Pro SP1
We are using ver 7.3.4 (old I know but we can’t
upgrade until early next year) on a linux 2.4 system and are having some flaky
problems with our apps. They just die at apparently random times.
In trying to figure out what is going on I noticed a couple of messages in
pg.log that concern m
That works. Thanks! (Thanks also to Joshua Drake, who contributed the same
answer.)
~ Ken
> -Original Message-
> From: Michael Glaesemann [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 30, 2005 11:19 PM
> To: Ken Winter
> Cc: PostgreSQL pg-general List
> Subject: Re: How to run
folks
i have problems with encodings
the scenario is:
database: CREATE DATABASE "testLatin"
WITH OWNER = owner1
ENCODING = 'LATIN9';
test table:
CREATE TABLE test
( nombre varchar(20))
WITH OIDS;
ALTER TABLE test OWNER TO marcelo;
data:
nombre
-
"maricón"
"ñañoso pícaro"
t
Hugo wrote:
don't know if this is the best solution but I dropped the database and
recreated it with SQL_ASCII instead of UTF-8 and everything worked as
expected
It would SQL_ASCII just accepts whatever it's given.
Hugo - a quick tip for future questions, just post the text of the
message not
marcelo Cortez <[EMAIL PROTECTED]> writes:
> i have problems with encodings
You need to make sure that the database locale matches what you want,
not only the encoding.
See the "Localization" chapter in the docs:
http://www.postgresql.org/docs/8.1/static/charset.html
reg
Yeah, I could use that too :)
I think that would be good in order to separate users on different disks
easily (if this parameter could be set by user too ...)
Le Jeudi 01 Décembre 2005 08:32, Alexander M. Pravking a écrit :
> PostgreSQL 8.0 brought a great tablespaces feature. However, it's still
Richard,I have to import data from a CSV file with the pgsql
COPY command, I just know that this file comes from an old program
written in Clipper (or something like under linux) , my database was
created with UTF8, I cant find how to create it with UTF-16 on
windows, what is the recomended encodi
"Medora Schauer" <[EMAIL PROTECTED]> writes:
> We are using ver 7.3.4 (old I know but we can't upgrade until early next
> year) on a linux 2.4 system and are having some flaky problems with our
> apps. They just die at apparently random times. In trying to figure
> out what is going on I noticed
I looked in the log again and sure enough I missed this immediately
before the WARNINGS:
PANIC: link from /data/database/pg_xlog/000100D9 to
/data/database/pg_xlog/000100E1 (initialization of log file 1,
segment 225) failed: No such file or directory
LOG: server process (pid 574
Hi everyone,
in 8.1 by default tables have no OID's anymore. Since OID's are 4 byte it's
probably a good idea to discourage the use of them (they produced a lot of
trouble in the past anyways, particularly with backup/restores etc)
Now there's the issue with stored procs. A usual construct wou
"Medora Schauer" <[EMAIL PROTECTED]> writes:
> I looked in the log again and sure enough I missed this immediately
> before the WARNINGS:
> PANIC: link from /data/database/pg_xlog/000100D9 to
> /data/database/pg_xlog/000100E1 (initialization of log file 1,
> segment 225) failed: N
The procedure syntax CREATE PROCEDURE doesn't exist in 8.1. What specific
topic are you referring to in your doc link reference?
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
Hi,
I'm setting up switchover (to another server) with WAL/PITR.
But I'm wondering what is the behaviour of postgresql when you shut it down,
while a new WAL archive is just ready to be copied, or if the transfer
is in progress ?
Is it kept on hold, until the next start, or is it copied before
On Wed, Nov 30, 2005 at 04:19:18PM -0500, Andrew Sullivan wrote:
> On Tue, Nov 29, 2005 at 07:44:05PM +, Tim Bunce wrote:
> > On Tue, Nov 29, 2005 at 10:50:01AM -0800, Tyler MacDonald wrote:
> > > PostgreSQL, doing a SELECT on a table that doesn't exist poisons the rest
> > > of
> > > the tran
Hi!
I am developing pl/pgsql functions with multi-dimensional array input
parameter.
I can use array_dims(), but it gives just the text representation of
the structure and it is not suitable when I want to iterate over the
whole array with the array_lower() and array_upper() functions. I want
to h
--- Tom Lane <[EMAIL PROTECTED]> escribió:
> marcelo Cortez <[EMAIL PROTECTED]> writes:
> > i have problems with encodings
>
> You need to make sure that the database locale
> matches what you want,
> not only the encoding.
>
> See the "Localization" chapter in the docs:
>
http://www.postgres
Tim Bunce wrote:
No doubt someone will quote the relevant parts. (And no doubt the
relevant parts will say "it depends" :)
I believe, the "no doubt" part is showing your age, aka experience. :-)
---(end of broadcast)---
TIP 6: explain analyze is
John D. Burger napisał(a):
>
> select v1.pkey1, v1.field2, v1.field3, v1.field4
> from view as v1
> join
> (select v2.field1, v2.field2, v2.field3
> from view as v2
> group by v2.field2, v2.field3, v2.field4
> having count(*) = 1)
> using (field2, field3, field4);
>
> This is
Hi,
Has any body got any experience of using Disk Keeper on Windows (On line
defragmenter) on the same machine as a PostgreSQL server. We are proposing
to use it but do not know if it will have any adverse effects on the overall
performance of the Postgres Server. If anybody is already using t
>
> "Medora Schauer" <[EMAIL PROTECTED]> writes:
> > I looked in the log again and sure enough I missed this immediately
> > before the WARNINGS:
>
> > PANIC: link from /data/database/pg_xlog/000100D9 to
> > /data/database/pg_xlog/000100E1 (initialization of log file
1,
> > segme
List,
I have a simple function:
CREATE OR REPLACE FUNCTION parse_string (TEXT, TEXT) RETURNS SETOF TEXT AS '
DECLARE
str ALIAS FOR $1; -- the string to parse
delimiter ALIAS FOR $2; -- the delimiter
field TEXT; -- return
I knew I was doing something stupid. Right after I sent this I realized I was
calling incorrectly. This works:
rnd=# select * from parse_string ('1/2/3/4/5', '/');
NOTICE: parse_string ()
parse_string
--
1
2
3
4
5
(5 rows)
And so does this:
rnd=# select ARRAY(SELECT * from pars
I seem to have found a rather odd interval bug.
Reading through the sql2003 spec, it would appear that the "proper" way
to represent an interval would be:
interval '10' day
(see pp 144-5, section 5.3 of ISO/IEC 9075-2:2003(E))
Excerpt:
::= INTERVAL [ ]
::=
Note that the qualifier is p
On 12/1/05, Alexander M. Pravking <[EMAIL PROTECTED]> wrote:
PostgreSQL 8.0 brought a great tablespaces feature. However, it's stilla real pain for one who wants to separate tables and indices to differenttablespaces: he has to do it manually, explicitely specifying tablespace
for each index.Thus,
Hugo wrote:
Richard,
I have to import data from a CSV file with the pgsql COPY command, I just
know that this file comes from an old program written in Clipper (or
something like under linux) , my database was created with UTF8, I cant
find how to create it with UTF-16 on windows, what is the r
Jaime Casanova <[EMAIL PROTECTED]> writes:
> that is a mis-conception... a transaction *must* be atomic (all or nothing)...
> the reason some databases act that bad is because they don't support
> savepoints, and because postgres does it doesn't need that
> awfulness...
Well it's not as bad as a
Hi,
I'm setting up switchover (to another server) with WAL/PITR.
But, I'm wondering what could be the behaviour of Postgresql if you
shutdown the
service while a new WAL archive is just ready to be copied, or if the
transfer is in
progress...
Will the tranfer be canceled (until the next start
"John D. Burger" <[EMAIL PROTECTED]> writes:
> I don't know what that does. If you mean:
>
> select max(p2.personID), p2.eyeColor, p2.hairColor, p2.skinColor
>from persons as p2
>group by p2.personID, p2.eyeColor, p2.hairColor, p2.skinColor
>having count(*) = 1;
>
> then I don't thi
Scott Marlowe <[EMAIL PROTECTED]> writes:
> Reading through the sql2003 spec, it would appear that the "proper" way
> to represent an interval would be:
> interval '10' day
This is not actually implemented. The bizarre special-purpose syntax
the spec requires for datetime literals was something
On 12/1/05, David Saunders <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Has any body got any experience of using Disk Keeper on Windows (On line
> defragmenter) on the same machine as a PostgreSQL server. We are proposing
> to use it but do not know if it will have any adverse effects on the overall
> perf
Where is Postgres at with psql using savepoints implicitly to wrap every
client command btw? My single biggest pet peeve with Postgres is that setting
autocommit off in psql is basically unusable because any typo forces you to
start your transaction all over again.
Going to have to disagree w
On 11/30/05, Brandon E Hofmann <[EMAIL PROTECTED]> wrote:
> The procedure syntax CREATE PROCEDURE doesn't exist in 8.1. What specific
> topic are you referring to in your doc link reference?
>
>
even while we haven't CREATE PROCEDURE yet we can define a function
and return VOID
you can find some
On Thu, Dec 01, 2005 at 01:04:52PM -0500, Greg Stark wrote:
> Where is Postgres at with psql using savepoints implicitly to wrap every
> client command btw? My single biggest pet peeve with Postgres is that setting
> autocommit off in psql is basically unusable because any typo forces you to
> star
Uwe C. Schroeder wrote:
Hi everyone,
in 8.1 by default tables have no OID's anymore. Since OID's are 4 byte it's
probably a good idea to discourage the use of them (they produced a lot of
trouble in the past anyways, particularly with backup/restores etc)
Now there's the issue with stored pr
On 12/1/05, Uwe C. Schroeder <[EMAIL PROTECTED]> wrote:
>
> Hi everyone,
>
> in 8.1 by default tables have no OID's anymore. Since OID's are 4 byte it's
> probably a good idea to discourage the use of them (they produced a lot of
> trouble in the past anyways, particularly with backup/restores etc)
Greg Stark <[EMAIL PROTECTED]> writes:
> Where is Postgres at with psql using savepoints implicitly to wrap every
> client command btw?
I think that 8.1 psql can be told to do that.
regards, tom lane
---(end of broadcast)---
I cannot get automatic schema update to work in 8.1 with
hibernate 3.0.5. I get the following error every time.
java.sql.SQLException: ERROR: function
information_schema._pg_keypositions() does not exist
Is this something I should be looking to fix with Hibernate
or PostgreSQL?
Executing the following from
“information_schema.sql” from the 8.0 distribution against the
restored database in 8.1 solved the problem. Is this a bug?
*
SET search_path TO
information_schema, public;
/*
* A few sup
Tom Lane wrote:
> Greg Stark <[EMAIL PROTECTED]> writes:
> > Where is Postgres at with psql using savepoints implicitly to wrap every
> > client command btw?
>
> I think that 8.1 psql can be told to do that.
Right:
\set ON_ERROR_ROLLBACK interactive
--
Bruce Momjian
"Jason Long" <[EMAIL PROTECTED]> writes:
> I cannot get automatic schema update to work in 8.1 with hibernate 3.0.5. I
> get the following error every time.
> java.sql.SQLException: ERROR: function information_schema._pg_keypositions()
> does not exist
Hm, it looks like some bright soul at Hiber
On Thu, 2005-12-01 at 12:08, Tom Lane wrote:
> Scott Marlowe <[EMAIL PROTECTED]> writes:
> > Reading through the sql2003 spec, it would appear that the "proper" way
> > to represent an interval would be:
>
> > interval '10' day
>
> This is not actually implemented. The bizarre special-purpose sy
Scott Marlowe <[EMAIL PROTECTED]> writes:
> Actually, I too prefer PostgreSQL's syntax. It's the worrisome
> behaviour of swallowing the spec syntax but not giving the right answer
> that scares me. Would it be very hard to have it just return an error
> in that case? Rather an error than the wr
If you feel the need to defragment your database files you need to set
them up differently. Using partitions on your hard disks and smart use
of tablespaces you can create a setup that needs no defragmenting.
Besides, on larger disks defragmentation isn't even necessary.On 12/1/05, David Saunders
Terry Lee Tucker wrote:
List,
I have a simple function:
CREATE OR REPLACE FUNCTION parse_string (TEXT, TEXT) RETURNS SETOF TEXT AS '
DECLARE
str ALIAS FOR $1; -- the string to parse
delimiter ALIAS FOR $2; -- the delimiter
field TEXT;
Greg Stark wrote:
select max(personid) as personid, eyecolor, haircolor, skincolor
from persons
group by eyecolor, haircolor, skincolor
having count(*) = 1
Aha, I understand Bruno's suggestion now! I was actually trying to
think of some way of using an aggregate on personid, but couldn't
* Philippe Ferreira ([EMAIL PROTECTED]) wrote:
> But, I'm wondering what could be the behaviour of Postgresql if you
> shutdown the
> service while a new WAL archive is just ready to be copied, or if the
> transfer is in
> progress...
> Will the tranfer be canceled (until the next start), or will
On Thu, 1 Dec 2005, Jason Long wrote:
I cannot get automatic schema update to work in 8.1 with hibernate 3.0.5. I
get the following error every time.
java.sql.SQLException: ERROR: function information_schema._pg_keypositions()
does not exist
This is actually a sign that you are using an 8
On Thu, Dec 01, 2005 at 11:18:14AM -0600, Medora Schauer wrote:
> I found this in /var/log/messages:
>
> Dec 1 09:23:40 Qc kernel: __alloc_pages: 0-order allocation failed
> (gfp=0x1d2/0)
> Dec 1 09:23:40 Qc kernel: VM: killing process postmaster
>
> Is this because we are running out of memory
On Thu, Dec 01, 2005 at 09:01:05AM -0800, Uwe C. Schroeder wrote:
> Now there's the issue with stored procs. A usual construct would be to
> ...
> ...
> INSERT xx;
> GET DIAGNOSTICS lastoid=RESULT_OID;
> SELECT oid=lastoid;
>
>
>
> Is there anything one could sanely replace this
hi Tom , folks
how do i " You need to make sure that the database
locale
> matches what you want," ?
any pointer by appreciated
sorry for silly questions ;)
best
___
1GB gratis, Antivirus y Ant
What does this error mean?
pg_restore: [tar archiver] could not find header for file 1765.dat
in tar archive
All of a sudden, I'm encountering this error as I debug a problem
with the db interface I'm using. My backups are created using a
script that hasn't changed recently, though I
I'm running 7.4.8 on RHEL 3.0 x86.
Today, on two separate servers, I modified the resolv.conf file to point
from two functioning name servers to two others.
Within 5 minutes, one server would not accept new remote connections. I
could log in fine w/ psql locally.
All name servers involved were
I can see it has been discussed before, why COUNT(*) tends to be slow on
PostgreSQL compared with ex. MySQL.
As far as I understood it has something to do with missing numbering on
the rows in the indexes and that there should be plenty of reasons not
to implement that in PostgreSQL, not that I
Scott Frankel <[EMAIL PROTECTED]> writes:
> What does this error mean?
> pg_restore: [tar archiver] could not find header for file 1765.dat
> in tar archive
It means either the tar file is corrupt or pg_restore has a bug.
Can tar read the file correctly? If so, does it find a file named
I have been trying to import a file into a table using lo_import and keep getting the error
ERROR: could not open server file "/tmp/myfile": Permission denied
The file is in /tmp so it is world readable and I made sure the file
had the correct permissions by doing chmod 777. My user has super use
On Thursday 01 December 2005 10:24, Jaime Casanova wrote:
> On 12/1/05, Uwe C. Schroeder <[EMAIL PROTECTED]> wrote:
> > Hi everyone,
> >
> > in 8.1 by default tables have no OID's anymore. Since OID's are 4 byte
> > it's probably a good idea to discourage the use of them (they produced a
> > lot of
Cott Lang <[EMAIL PROTECTED]> writes:
> I'm running 7.4.8 on RHEL 3.0 x86.
> Today, on two separate servers, I modified the resolv.conf file to point
> from two functioning name servers to two others.
> Within 5 minutes, one server would not accept new remote connections. I
> could log in fine w/
Poul,
2 thingsfirst, why do you think it will have an impact on inserts?
And the second oneuse InnoDb tables in MySQL, and you will have the
same than with PostgreSQL, it's because of MVCC
Best regards
Rodrigo
Poul Møller Hansen wrote:
I can see it has been discussed before, why CO
On Thu, Dec 01, 2005 at 12:32:02PM -0500, Terry Lee Tucker wrote:
> List,
>
> I have a simple function:
I have a simpler one :)
CREATE OR REPLACE FUNCTION split_to_rows(TEXT, TEXT) /* Descriptive name */
RETURNS SETOF TEXT
STRICT
LANGUAGE sql
AS $$
SELECT (string_to_array($1, $2))[s.i]
F
On Thu, Dec 01, 2005 at 02:15:39PM +0100, &ru wrote:
> Hi!
>
> I am developing pl/pgsql functions with multi-dimensional array input
> parameter.
> I can use array_dims(), but it gives just the text representation of
> the structure and it is not suitable when I want to iterate over the
> whole ar
Yes, the tar file contains a file called 1765.dat. A `cat` of that
file shows nothing more than an empty line (i.e.: a carriage return).
-rw--- 1 frankel prod1 Nov 29 11:20 1765.dat
Extracting the archive, tar reported a "lone zero block." I don't
know what this re
Scott Frankel <[EMAIL PROTECTED]> writes:
> Yes, the tar file contains a file called 1765.dat. A `cat` of that
> file shows nothing more than an empty line (i.e.: a carriage return).
> -rw--- 1 frankel prod1 Nov 29 11:20 1765.dat
> Extracting the archive, tar reported a "l
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> I have been trying to import a file into a table using lo_import and keep
> getting the error
> ERROR: could not open server file "/tmp/myfile": Permission denied
> The file is in /tmp so it is world readable and I made sure the file had the
> cor
Hi everyone, I'm totally new here and I got a little issue.
I just got done installing PostgreSQL 8.1. I have configured PostgreSQL
to start automatically upon system start via an init script. Problem
is that when CentOS boots it halts on "Starting PostgeSQL". I have
to press the key to resume
Hello,Does anyone know a fast way to convert a FrontBase 4.1.16 database to a PostgreSQL 8.1 database? I have a java program that does it, but I was hoping there would be something faster. Last time I converted a database with it, it took quite a few hours. I have a production system that I need to
Poul Møller Hansen <[EMAIL PROTECTED]> writes:
> My questions is, which statements can use to count the rows faster ?
> 32 secs compared to 10 ms !
Try starting a transaction in one window updating one of those records and see
how long it takes your count(*) to complete in the other window while
Tom,
Yep I have double checked my permissions on /tmp. You may be right with
your suggestion about SELinux. I was actually testing this on two boxes
and one is a Fedora box which I believe runs SELinux. I have gotten
things to work on the Gentoo box now. It would not work when I was
logged in as r
> Within 5 minutes, one server would not accept new remote connections. I
> could log in fine w/ psql locally.
This is pretty bizarre ... offhand I would not have thought that the
postmaster depended on DNS service at all. Were you maybe using DNS
names instead of IP addresses in pg_hba.co
79 matches
Mail list logo