I see v_dt is not initialized before comparison, there should be some value
in it before it is useful.
--Imad
On Tue, Sep 9, 2008 at 8:47 AM, Adrian Klaver [EMAIL PROTECTED] wrote:
-- Original message --
From: Ruben Gouveia [EMAIL PROTECTED]
i get
a difference.
--Imad
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
column
Try concatenating your columns using the '||' operator or 'concat' function
and project only one column from the subquery. You won't need to convert it
to an array and back to string.
--Imad
Database Expert
---(end of broadcast)---
TIP 3: Have
You might be looking for PostgreSQL RECORD data type.
--Imad
www.EnterpriseDB.com
On 5/11/07, Gábriel Ákos [EMAIL PROTECTED] wrote:
Hi,
How should I define a record type (there is no table with this record
type) programmatically in pl/pgsql?
I'd like to return a record with 3 string elements
create a function with return type as a RECORD.
CREATE FUNCTION xyz() RETURNS record AS
$$
declare
abc RECORD;
begin
abc := (1, 2);
return abc;
end;
$$
language plpgsql;
And execute the function in this fashion:
select a, b from xyz() as (a int, b int);
Do you like that ... :-)
--Imad
... valid point.
e.g. As Imad gives in his example ...
CREATE FUNCTION xyz() RETURNS record AS
$$
declare
abc RECORD;
begin
abc := (1, 2);
return abc;
end;
$$
language plpgsql;
And execute the function in this fashion:
select a, b from xyz() as (a int, b int);
The only problem
Change it in the postgresql.conf file only if you want to make it permanent.
Otherwise just set the variable for your current session without a
server restart.
--Imad
www.EnterpriseDB.com
On 1/31/07, Ezequias Rodrigues da Rocha [EMAIL PROTECTED] wrote:
It was commented. Thank you Shoaib Mir
I
You did not grant access privileges to schema.
Also GRANT administrators on the base schema as you did for the table.
--Imad
www.EnterpriseDB.com
On 12/1/06, Ezequias Rodrigues da Rocha [EMAIL PROTECTED] wrote:
Hi list,
I am having problem with grants and users on PostgreSQL.
I am using
Why dont you try to make 'username' part of your query.
While auditing updates and inserts, the username can be some how made
a part of the tuple being inserted. Just a thought!
--Imad
www.EnterpriseDB.com
On 11/18/06, Rajesh Kumar Mallah [EMAIL PROTECTED] wrote:
Hi ,
Is there any way to set
Check this one
http://archives.postgresql.org/pgsql-patches/2004-04/msg00280.php
I have not personally worked on what is described in this page but someone will
correct you in the community if anything is going wrong here.
--Imad
www.EnterpriseDB.com
On 11/19/06, Rajesh Kumar Mallah [EMAIL
I am able to do this thing with the following query:
insert into employee (a, name, s) values(1, 'emp name', ((1,
'(01/01/2000, 01/01/2000)')));
--Imad
www.EnterpriseDB.com
On 11/13/06, Rodrigo Sakai [EMAIL PROTECTED] wrote:
Hi, I have a question about how to insert data
max (timestamptz, timestamptz) does not exist already. You need to
create a simple function in PLpgSQL something like
if a b
return a;
else
return b;
Even an sql function will do the job here using case statement.
--Imad
www.EntepriseDB.com
On 11/13/06, A. Kretschmer [EMAIL PROTECTED
.
--Imad
www.EnterpriseDB.com
On 11/14/06, Rodrigo Sakai [EMAIL PROTECTED] wrote:
I know that if I create a table salary that references my employee table
works! But I'm trying to work with the composite type concept!
Thinking in Object-Oriented Programming (OOP) I have a class employee
Can you write the error message here?
--Imad
www.EnterpriseDB.com
On 11/6/06, Hubert Retif [EMAIL PROTECTED] wrote:
Hi,
I am migrating my application from MySQL to Postgresql and have met
following situation:
SELECT
(sum(sold_price)/(select sum(sold_price) from car_archive))*100
This is *not* a good practice to handle elements of a composite data
type seperately because they all build it up together and without one
of it, the data type is meaningless.
Secondly, If you are going to base our application on this principle,
you better rethink your design.
--Imad
What else do you want to know about it? (keeping in mind the example you gave)
Because, apparently this is just a matter of min and max.
--Imad
On 11/1/06, Raghuraman K [EMAIL PROTECTED] wrote:
Hi,
I have a table like this: create
table(xyz char(10), answer number(4)). There are a lot of rows
You can return a record:
create function thing(text) returns record as 'select * from whatever
where id=$1' language sql;
Hope this helps.
--Imad
www.EnterpriseDB.com
On 11/5/06, Mark Simon [EMAIL PROTECTED] wrote:
I am trying to create a simple function using SQL rather than PGSQL
for PostgreSQL. Get it from pgFoundry.
--Imad
www.EnterpriseDB.com
On 11/4/06, Dylan Lorimer [EMAIL PROTECTED] wrote:
So I kicked off a SQL transaction that has been running for 30+ minutes. Is
there any way to monitor it to know if it has possibly hanged or not? To be
fair, it is an update on 4
When you select from views, you are infact selecting from the
underlying tables. Indexes created on those tables are used
ultimately.
--Imad
www.EnterpriseDB.com
On 11/4/06, Dylan Lorimer [EMAIL PROTECTED] wrote:
Hi,
If I've got several tables, each with their own indexes. I also have a view
Or you can probably use a PostgreSQL administration tool for scheduled
jobs. I know a number of such tools which provide this feature and
EnterpriseDB Management Server is one of them.
--Imad
www.EnterpriseDB.com
On 11/2/06, A. Kretschmer [EMAIL PROTECTED] wrote:
am Thu, dem 02.11.2006, um
Yeah, and EnterpriseDB Management Server is a community project and
can be used for free, off course!
--Imad
www.EnterpriseDB.com
On 11/3/06, A. Kretschmer [EMAIL PROTECTED] wrote:
am Fri, dem 03.11.2006, um 0:04:50 +0500 mailte imad folgendes:
Or you can probably use a PostgreSQL
hi,
I want to know is there any way to execute an anonymous PL/pgSQL block
in PostgreSQL.
Thanx
--
Regards
Imad
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings
22 matches
Mail list logo