-- Forwarded Message: --
From: [EMAIL PROTECTED] (Adrian Klaver)
To: Shawn [EMAIL PROTECTED]
Subject: Re: [SQL] Part 1 of several - Converting a varchar to an interval
Date: Wed, 26 Mar 2008 16:16:58 +
-- Original message
-- Original message --
From: Tom Lane [EMAIL PROTECTED]
[EMAIL PROTECTED] (Adrian Klaver) writes:
select ('134987'::int/1000.00) * interval ' 1 second' ;
?column?
--
00:02:14.987
(1 row)
Or even easier:
regression=# select
-- Original message --
From: Tom Lane [EMAIL PROTECTED]
[EMAIL PROTECTED] (Adrian Klaver) writes:
Select 134987 * interval '1 msec';
ERROR: invalid input syntax for type interval: 1 msec
SELECT version
message if any?
--
Adrian Klaver
[EMAIL PROTECTED]
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
it.
Sincerely, Dean
Test
--
Adrian Klaver
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
it.
Sincerely, Dean
It bounced.
--
Adrian Klaver
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
On Monday 25 February 2008 7:32 pm, Scott Marlowe wrote:
On Mon, Feb 25, 2008 at 9:17 PM, Adrian Klaver [EMAIL PROTECTED] wrote:
On Monday 25 February 2008 7:13 pm, Dean Gibson (DB Administrator) wrote:
I have changed something in my eMail client regarding receiving
messages
On Monday 25 February 2008 8:07 pm, Scott Marlowe wrote:
On Mon, Feb 25, 2008 at 9:54 PM, Adrian Klaver [EMAIL PROTECTED] wrote:
So, your email client puts Dean's email address back in? Might I ask
what option you chose? And if you have more than one? On gmail
there's the reply
to it for
8.4.
Would this be a variation of this item from the TODO:
* Allow INSERT/UPDATE ... RETURNING inside a SELECT 'FROM' clause
http://archives.postgresql.org/pgsql-general/2006-09/msg00803.php
http://archives.postgresql.org/pgsql-hackers/2006-10/msg00693.php
--
Adrian Klaver
[EMAIL
('1987-02-01'::timestamp);
age
--
20 years 11 mons 26 days
(1 row)
--
Adrian Klaver
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 6: explain analyze is your friend
to
choose an index scan if your joining column's datatypes do not
match
--
Adrian Klaver
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
such tables created in other sessions.
Or maybe anyone knows the identification (apart from 'others') of error to
trap it with EXCEPTION clause?
select * from temp_table limit 1;
Trap error 42P01 Undefined table.
--
Adrian Klaver
[EMAIL PROTECTED]
-
---BeginMessage---
Hi all. Is there a way
it to work with your sample data by using the COPY command as follows:
COPY geo.orig_city_maxmind
FROM '/home/www/geo/DATA/MAXMIND.com/cities_no_header.txt'
CSV quote as ;
--
Adrian Klaver
[EMAIL PROTECTED]
---(end of broadcast
it a
field of type bit (week_flag) where the function needs a text type. See the
documentation for bit functions-
http://www.postgresql.org/docs/8.2/interactive/functions-bitstring.html
There are some bit compatible string functions mentioned.
--
Adrian Klaver
[EMAIL PROTECTED
: syntax error at or near LOOP
SQL state: 42601
Character: 1
I installed the pgsql but I don't think it is a problem of language.
What could be wrong ? I am not using functions too. I am using the SQL
tool of PgAdmin III.
Any help would be glad.
Can we see the complete function?
--
Adrian
.
Ezequias
Snip
Try select md5('password'||'user')
The generated hash is a combination of the password and the user name.
--
Adrian Klaver
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
NOINHERIT. This means ezequias
does not automatically assume the privileges of the ROLES it belongs to. To
acquire the privileges you have to do a SET ROLE administrators at the
connection.
--
Adrian Klaver
[EMAIL PROTECTED]
---(end of broadcast
one planning to add it? It can come it handy I bet.
Thanks again,
Mustafa...
It may not be a shortcoming of the language, but a shortcoming in how well I
understand it. I haven't given up hope I can make it work in plpgsql. The
problem was I was going in circles.
--
Adrian Klaver
where table_name~svc_tbl_name loop
raise notice 'Column name:%', col_name.column_name;
raise notice 'Value: %', svc_data_rec[col_name.column_name];
end loop;
Thank you,
Mustafa ...
I am afraid I can't make it work either.
--
Adrian Klaver
[EMAIL
On Sunday 26 November 2006 02:45 pm, Adrian Klaver wrote:
I am afraid I can't make it work either.
I could not make it work with pl/pgsql, but I did manage to come up with a
solution using pl/pythonu.
The function is as follows-
CREATE OR REPLACE FUNCTION dat_col_py(text) RETURNS text
.
The change is reflected in the HISTORY text though. How is the best way to get
a change made to the documentation?
--
Adrian Klaver
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire
On Friday 24 November 2006 06:55 am, Andreas Kretschmer wrote:
Adrian Klaver [EMAIL PROTECTED] schrieb:
On Thursday 23 November 2006 08:45 pm, Tom Lane wrote:
Mulham freshcode [EMAIL PROTECTED] writes:
execute sql_str1 into svc_data_rec ;
svc_data_rec is a RECORD, which
are looking for
data from a single field couldn't you dispense with the RECORD variable and
just build a query of the form SELECT col_name FROM tbl_name. If you want to
go through a set of fields then it would involve some nested loops.
--
Adrian Klaver
[EMAIL PROTECTED
#PLPG
SQL-STATEMENTS-EXECUTING-DYN
Andreas
My guess is that the error message is correct, the svc_data_rec has not had
any values assigned to it. In other words the EXECUTE statement is not
working the way you think it is. Could you post the EXECUTE string?
--
Adrian Klaver
[EMAIL
old is not
assigned. Is there a way to distinguish in the trigger procedure from
an insert statement to an update statement?
Regards,
--
Daniel CAUNE
Ubisoft Online Technology
(514) 490 2040 ext. 3613
--
Adrian Klaver
[EMAIL PROTECTED]
---(end
for information on using COPY to load data from a file
into a table-
www.postgresql.org/docs/8.1/interactive/sql-copy.html
--
Adrian Klaver
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your
.
Andy
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
--
Adrian Klaver
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 6: explain analyze is your friend
see is that it is
called at 1 and a '(' shows up to the left of the prompt at 2 and stays
there indicating to me at least the parser is not happy.
--
Adrian Klaver
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 8: explain analyze is your friend
?
http://www.postgresql.org/docs/faqs/FAQ.html
--
Adrian Klaver
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html
101 - 129 of 129 matches
Mail list logo