On Tue, Jan 11, 2005 at 12:03:16AM -0600, [EMAIL PROTECTED] wrote:
I need to know the day of the week for a schedule rotation algorithm
i'm working on.
Others have already replied to this part.
I've switched the datestyle format in the .conf file and used the
set to command, but my output
Hi,
How can I create a publice or private function?
Nirmalya Lahiri
__
Do you Yahoo!?
Yahoo! Mail - 250MB free storage. Do more. Manage less.
http://info.mail.yahoo.com/mail_250
---(end of
Hi All!
I'm trying in 'plperl' forking the processes by 'fork' function,
but receiving this message
Warning: pg_exec(): Query failed: ERROR: creation of function failed: 'fork'
trapped by operation mask at (eval 2) line 11.
Does it mean, that in 'plperl' I can't use 'fork' function???
Nirmalya Lahiri wrote:
Hi,
How can I create a publice or private function?
I'm not sure the concept makes sense in PostgreSQL. Can you explain what
you're trying to achieve?
--
Richard Huxton
Archonet Ltd
---(end of broadcast)---
TIP 2: you
On Tue, 2005-01-11 at 14:59 +0300, ON.KG wrote:
I'm trying in 'plperl' forking the processes by 'fork' function,
but receiving this message
Warning: pg_exec(): Query failed: ERROR: creation of function failed: 'fork'
trapped by operation mask at (eval 2) line 11.
Does it mean, that in
ON.KG wrote:
Hi All!
I'm trying in 'plperl' forking the processes by 'fork' function, but
receiving this message
Warning: pg_exec(): Query failed: ERROR: creation of function failed:
'fork' trapped by operation mask at (eval 2) line 11.
Does it mean, that in 'plperl' I can't use 'fork' function???
Can you insert and update data in views in 8.0 I know you cannot in 7.4. I
am asking because I want to make new structure for my backend but for legacy
apps I need to keep the old sturcture also. I was hoping to use views to
accomplish this by making the new structure and give the old apps
I asked:
to_char(0,'.99')
returns .00 rather than 0.00.
Dave Smith replied:
to_char(0,'9990.00')
?
Thanks Dave, that's embarrassingly obvious...
I note that the examples in the documentation don't have a 0 before the
decimal point, e.g. this one
to_char(148.5, 'FM999.990')
Am Dienstag, 11. Januar 2005 13:43 schrieb Jason Tesser:
Can you insert and update data in views in 8.0 I know you cannot in 7.4.
Views not updatable in 7.4 or in 8.0. You need to write your own update
rules. Nothing has changed in that regard.
--
Peter Eisentraut
I would also suggest in addition to the other folks comments that you
benchmark the 4 disks in RAID 10 in addition to RAID 5. RAID 5
typicaly has poor write performance because it must read the stripe,
modify, calculate new parity and write, and if you are doing alot of
inserts, you may find that
Greetings:
I am working on a function which returns an interval value. The work of the
function is to calculate the difference between the appointment timestamp and
and the current timestamp, represented as an interval, and the the time
required to travel from point A to B, represented as an
Can you post the code for the function you are having trouble with?
The following psql query works as expected (returns a negative
interval):
select '3 days 4 hours 17 mins'::interval - '3 days 6 hours 17
mins'::interval;
?column?
---
-02:00:00
Inserting the difference into a table
On Tue, 11 Jan 2005, Terry Lee Tucker wrote:
As you can see, this truck is going to be 2 hours late. The return value I'm
looking for is the difference between Appt. Interval and Travel Interval, as
in: return (appt_interval - travel_interval). This value will be stored in a
column of type
Terry Lee Tucker [EMAIL PROTECTED] writes:
I thought that subtracting the larger interval from
the small would return this but it is always the absolute value.
Eh?
regression=# set DateStyle TO ISO;
SET
regression=# select '@ 3 days 4 hours 17 mins'::interval -
regression-# '@ 3 days 6 hours
lol wrote:
I have tried RC4, but there's no differences
My results using my configuration are :
MySQL 4 is 6 times faster than pgSQL
Firebird 1.5 is 3 times faster than pgSQL
Are these results coherent ? May be the problem comes more from ZeosLib
than pgSQL8
what zeoslib do you use?
6.X?
thay are
I've been trying to check that my current application working on
postgres 7.4 will work with 8.0.
I've not checked the application yet but I'm getting a few error messages,
I don't understand and are worring me slightly. I need to get 8.0 to work
because I'm keen to start using the new
Is is a bare bones copy of the function. The travel time is hard coded for
the example.
By the way, I'm on version 7.4.
On Tuesday 11 January 2005 10:10 am, Timothy Perrigo saith:
Can you post the code for the function you are having trouble with?
The following psql query works as expected
Check this out:
rnd=# show DateStyle;
DateStyle
---
SQL, MDY
(1 row)
rnd=# select interval '@ 3 days 4 hours 17 mins'::interval - '@ 3 days 6 hours
17 mins'::interval;
?column?
---
@ 2 hours
(1 row)
And...
rnd=# set DateStyle to postgres;
SET
rnd=# select interval '@ 3 days
Apparently, if DateStyle is set to Sql, it always returns the absolute value.
Is this due to some Sql standard or is it a bug?
On Tuesday 11 January 2005 10:19 am, Tom Lane saith:
Terry Lee Tucker [EMAIL PROTECTED] writes:
I thought that subtracting the larger interval from
the small would
On Mon, Jan 10, 2005 at 14:40:46 -0800,
Chris [EMAIL PROTECTED] wrote:
Basically what I want is to limit a user to not being able to view
certain tables within a schema, in this case the public schema. Say
we have 300 tables in a database but a particular user only needs
access to 3 of
ON.KG wrote:
Hi All!
I'm trying in 'plperl' forking the processes by 'fork' function,
but receiving this message
Have you tried performing this with plperlU?
Sincerely,
Joshua D. Drake
Warning: pg_exec(): Query failed: ERROR: creation of function failed: 'fork'
trapped by operation mask at
What do you mean by view other tables? You can see metadata for tables
in the catalog tables and you can't block access to those without causing
problems.
That is what I meant, viewing the metadata. I didn't think there was
a way to block that without causing problems, but thought i would
Thanks for the answers.
By the way, I'm not trying to parse the textual output to discover if it is
netative. Apparently, I failed to communicate my purpose properly. I just
want to return the value, regardless of netative or positive, to the user and
store it in a column of type interval. I
Nirmalya Lahiri wrote:
Thanks Richard,
for your reply. Now I am explaining you what I want.
Let I have 4
functions..function_1(),function_2(),function_3(),function_4().
[snip]
Now after creating these functions, I can easily call every function
from psql prompt. But I want to encapsulate
Thanks Richard,
for your reply. Now I am explaining you what I want.
Let I have 4
functions..function_1(),function_2(),function_3(),function_4().
create or replace function function_1() returns numeric as '
begin
create or replace function function_2() returns numeric as ''
begin
Terry Lee Tucker [EMAIL PROTECTED] writes:
Apparently, if DateStyle is set to Sql, it always returns the absolute value.
Is this due to some Sql standard or is it a bug?
It's a bug in interval_out. Looks like it gets it wrong for GERMAN
style too. Surprising no one noticed before.
(In any
Tom Lane wrote:
Terry Lee Tucker [EMAIL PROTECTED] writes:
Apparently, if DateStyle is set to Sql, it always returns the absolute value.
Is this due to some Sql standard or is it a bug?
It's a bug in interval_out. Looks like it gets it wrong for GERMAN
style too. Surprising no one noticed
Geoffrey [EMAIL PROTECTED] writes:
Tom Lane wrote:
It's a bug in interval_out. Looks like it gets it wrong for GERMAN
style too. Surprising no one noticed before.
Any idea when I might be able to put my hands on Red Hat 3 rpm versions
that include this fix?
[ shrug... ] Whenever there
On Tue, Jan 11, 2005 at 18:36:17 +,
Richard Huxton dev@archonet.com wrote:
Nirmalya Lahiri wrote:
Thanks Richard,
for your reply. Now I am explaining you what I want.
Let I have 4
functions..function_1(),function_2(),function_3(),function_4().
[snip]
Now after creating these
On Tue, Jan 11, 2005 at 15:40:07 +,
Peter Childs [EMAIL PROTECTED] wrote:
I thought pg_autovaccum was going to be built into 8.0 or was that
only a rumor.
Due to some unfortunate things it was not ready by the beta cutoff, so it
is staying in contrib for the 8.0 release.
I know I can SET the schema search_path in a stored procedure, but is
there any way to retrieve it first so that I can get the current value
and manipulate that rather than just replace it?
I've got two sets of data and two sets of functions in 4 respective
schemas. I want to select one set of
On Tue, Jan 11, 2005 at 01:19:55PM -0800, Eric Brown wrote:
I know I can SET the schema search_path in a stored procedure, but is
there any way to retrieve it first so that I can get the current value
and manipulate that rather than just replace it?
See the current_setting() and
Eric Brown [EMAIL PROTECTED] writes:
I know I can SET the schema search_path in a stored procedure, but is
there any way to retrieve it first so that I can get the current value
and manipulate that rather than just replace it?
current_setting() would produce the value you want to give back
I run 'psql -f mycreatedb.sql' to setup things for my program.
It has to run a few stored procedures after they're created. However, I
do this by 'SELECT f(...);'. When I do this though, it prints out a
bunch of rubbish like:
f
--
(1 row)
How do I get rid of this rubbish? I just want to see
Hello,
what is the opposite of cast(extract('epoch' from now()) as int)?
The only thing I found that works is
cast(cast(... as abstime) as timestamp)
and the documentation says abstime shouldn't be used, and may
disappear. What should I use instead?
--
FreeBSD 4.10-STABLE
12:01AM up 15:39, 7
Eric Brown [EMAIL PROTECTED] writes:
I run 'psql -f mycreatedb.sql' to setup things for my program.
It has to run a few stored procedures after they're created. However, I
do this by 'SELECT f(...);'. When I do this though, it prints out a
bunch of rubbish like:
f
--
(1 row)
How do
Roman Neuhauser [EMAIL PROTECTED] writes:
what is the opposite of cast(extract('epoch' from now()) as int)?
The only thing I found that works is
cast(cast(... as abstime) as timestamp)
and the documentation says abstime shouldn't be used, and may
disappear. What should I use instead?
The
On Jan 12, 2005, at 8:35, Tom Lane wrote:
The recommended locution is
SELECT TIMESTAMP WITH TIME ZONE 'epoch' + x * INTERVAL '1 second';
Of course you can wrap this up in a function if you prefer (not sure
why
we haven't done so already).
It's in the queue for 8.1.
# [EMAIL PROTECTED] / 2005-01-11 18:35:18 -0500:
Roman Neuhauser [EMAIL PROTECTED] writes:
what is the opposite of cast(extract('epoch' from now()) as int)?
The only thing I found that works is
cast(cast(... as abstime) as timestamp)
and the documentation says abstime shouldn't be used,
Roman Neuhauser [EMAIL PROTECTED] writes:
The recommended locution is
SELECT TIMESTAMP WITH TIME ZONE 'epoch' + x * INTERVAL '1 second';
Have I missed this in the manual?
The 8.0 docs mention this in the discussion of extract(epoch), but I'm
not sure if it was there before. It's been
On Tue, Jan 11, 2005 at 06:35:18PM -0500, Tom Lane wrote:
Roman Neuhauser [EMAIL PROTECTED] writes:
what is the opposite of cast(extract('epoch' from now()) as int)?
The only thing I found that works is
cast(cast(... as abstime) as timestamp)
and the documentation says abstime shouldn't
David Fetter [EMAIL PROTECTED] writes:
The recommended locution is
SELECT TIMESTAMP WITH TIME ZONE 'epoch' + x * INTERVAL '1 second';
I think this should read:
SELECT TIMESTAMP WITH TIME ZONE 'epoch' AT TIME ZONE 'UTC' + x * INTERVAL
'1 second';
/*
# [EMAIL PROTECTED] / 2005-01-11 19:31:19 -0500:
Roman Neuhauser [EMAIL PROTECTED] writes:
The recommended locution is
SELECT TIMESTAMP WITH TIME ZONE 'epoch' + x * INTERVAL '1 second';
Have I missed this in the manual?
The 8.0 docs mention this in the discussion of
On Tue, Jan 11, 2005 at 07:44:46PM -0500, Tom Lane wrote:
David Fetter [EMAIL PROTECTED] writes:
The recommended locution is
SELECT TIMESTAMP WITH TIME ZONE 'epoch' + x * INTERVAL '1 second';
I think this should read:
SELECT TIMESTAMP WITH TIME ZONE 'epoch' AT TIME ZONE 'UTC' + x *
I regularly do a pg_dump -s and store the file in CVS. Normally I briefly look
over the diff before committing so I can describe the changes. This latest
time I observed a strange behaviour.
7.4.6 pg_dump seems to be inserting a lot more SET SESSION AUTHORIZATION lines
than previously. Before
Is it possible to tell if a column in a NEW record in a plpgsql function was
explicitly specified as NULL or simply left out altogether?
For example, if I have the following table:
create table foo(id serial, msg varchar)
Is it possible to distinguish within plpgsql between these two
Ed L. [EMAIL PROTECTED] writes:
For example, if I have the following table:
create table foo(id serial, msg varchar)
Is it possible to distinguish within plpgsql between these two queries?
insert into foo (msg) values ('Hello')
insert into foo (id, msg) values (NULL,
Greg Stark [EMAIL PROTECTED] writes:
7.4.6 pg_dump seems to be inserting a lot more SET SESSION
AUTHORIZATION lines than previously.
By previously do you mean 7.4.5 or thereabouts? I can't recall any
late-7.4.* changes that might affect this. pg_dump is supposed to
optimize away redundant SET
On Tuesday January 11 2005 8:40, Tom Lane wrote:
Is it possible to distinguish within plpgsql between these two queries?
insert into foo (msg) values ('Hello')
insert into foo (id, msg) values (NULL, 'Hello')
Well, yes, because the default value in the former case will not be
On Tuesday January 11 2005 8:58, Tom Lane wrote:
Ed L. [EMAIL PROTECTED] writes:
The reason I ask is because I'd like to allow any explicitly specified
values for the view insert, including NULL, to be passed through to the
table insert and override the column defaults.
Possibly you can
Ed L. [EMAIL PROTECTED] writes:
The reason I ask is because I'd like to allow any explicitly specified
values for the view insert, including NULL, to be passed through to the
table insert and override the column defaults.
Possibly you can solve your problem by attaching the defaults to the
On Tue, Jan 11, 2005 at 07:13:25PM -0700, Ed L. wrote:
Is it possible to tell if a column in a NEW record in a plpgsql function was
explicitly specified as NULL or simply left out altogether?
Why would you want to? What problem are you trying to solve?
--
Michael Fuhr
Tom Lane [EMAIL PROTECTED] writes:
Greg Stark [EMAIL PROTECTED] writes:
7.4.6 pg_dump seems to be inserting a lot more SET SESSION
AUTHORIZATION lines than previously.
By previously do you mean 7.4.5 or thereabouts?
I think I went from 7.4.2 to 7.4.6. But I'm having trouble finding any
53 matches
Mail list logo