[GENERAL] checking data type

2006-03-29 Thread raj
is there a function that could check for a variable's data type? like i want to check all the columns of a table and if i found a column with an integer data type i set it to a default 1 and i'll set a constant to a column of type text. ---(end of broadcast)-

Re: [GENERAL] checking data type

2006-03-30 Thread raj
Hi, Chris (great looking site, by the way)! thanks for responding. i was just practicing on postgres and encountered this problem. i am using pg admin for postgres and for some reason the commands you posted does not seem to work. i was kinda looking for an built-in function like "upper() or max()

Re: [GENERAL] copy command - date

2007-08-17 Thread Raj A
Thanks again guys =) I've managed to use temp table to load the data and create new table/s Now, how do I convert a text field with 'YY/MM/DD' to date field 'DD/MM/YY'? On 13/08/07, Tom Lane <[EMAIL PROTECTED]> wrote: > Paul Lambert <[EMAIL PROTECTED]> writes: > >> novice wrote: > >>> db5=> \copy

[GENERAL] Join query help

2007-08-20 Thread Raj A
Hi, We have the following three tables. safety=> SELECT record_id, record_date FROM record; record_id | record_date ---+ 1 | 2007-07-23 11:30:37+10 2 | 2007-07-27 11:30:14+10 3 | 2007-07-17 13:15:03+10 (3 rows) safety=> SELECT obser

Re: [GENERAL] work hour calculations

2007-09-06 Thread Raj A
correction: > The result I'm expecting for the above to be > >notification_time| finished_time | actual > ++- > 2007-07-06 15:50:00+10 | 2007-07-09 07:10:00+10 | 01:20:00 > 2007-07-07 12:30:00+10 | 2007-07-09 07

[GENERAL] data type

2011-03-02 Thread Nick Raj
place of ?) that can collect more than one row(20,000) ? Thanks Raj

[GENERAL] Composite index structure

2011-03-06 Thread Nick Raj
ement this composite index structure in postgres? Let us suppose, if i create mygist index, then i have to write my own operator class? or can i use gist index as it is and btree tree as it is. I mean their operator class and their gist methods but how to establish linkage between them? Any idea ?? Thanks Raj

[GENERAL] Understanding Datum

2011-03-23 Thread Nick Raj
, Raj

Re: [GENERAL] Understanding Datum

2011-03-23 Thread Nick Raj
?? How to find out what type of pointer argument is PG_GETARG_POINTER(1)?? Thanks, Nirmesh On Wed, Mar 23, 2011 at 11:40 PM, Radosław Smogura wrote: > Nick Raj Wednesday 23 March 2011 18:45:41 > > Hi, > > I am understanding the postgres code. In code, i just want to see what > a

Re: [GENERAL] Understanding Datum

2011-03-23 Thread Nick Raj
lue of Datum in postgres? On Thu, Mar 24, 2011 at 2:35 AM, Tom Lane wrote: > Nick Raj writes: > > In postgres, typedef uintptr_t Datum > > Datum is getting value from PG_GETARG_POINTER(1); > > But, now problem is how would i know the type of PG_GETARG_POINTER(1) > > (

[GENERAL] Integrating New Data Type

2011-04-05 Thread Nick Raj
Hi all, I have defined a new data type. I have defined in and out function for that data type. But i want to know how to integrate this data type with postgres (how postgres compile my code or know my datatype) ? Thanks, Nirmesh

[GENERAL] Global Variables in plpgsql

2011-04-11 Thread Nick Raj
Hi, Can anyone know how to define global variable in plpgsql? Thanks Regards, Raj

[GENERAL] Help regarding flushing data from Shared Memory to Database

2017-03-09 Thread Naveen Raj
Hi, We are currently working on cstore extension. We are storing the all the inserts in a shared memory and then flushing the tuples to the database. We are using a background worker to periodically flush the data. But the problem is we are not able to do the insert the data during the periodic che

[GENERAL] Help regarding flushing data from Shared Memory to Database

2017-03-09 Thread Naveen Raj
Hi, We are currently working on cstore extension. We are storing the all the inserts in a shared memory and then flushing the tuples to the database. We are using a background worker to periodically flush the data. But the problem is we are not able to do the insert the data during the periodic che

[GENERAL] Typecast

2011-04-15 Thread Nick Raj
Hi, Can anybody tell me how to typecast data type Point into Datum? Thanks Nick

Re: [GENERAL] Typecast

2011-04-18 Thread Nick Raj
Thanks dude On Mon, Apr 18, 2011 at 2:25 PM, Chetan Suttraway < chetan.suttra...@enterprisedb.com> wrote: > > > On Fri, Apr 15, 2011 at 10:29 PM, Nick Raj wrote: > >> Hi, >> Can anybody tell me how to typecast data type Point into Datum? >> >> Thanks &g

[GENERAL] Defining input function for new datatype

2011-04-21 Thread Nick Raj
Hi, I am defining a new data type called mpoint i.e. typedef struct mpoint { Point p; Timestamp t; } mpoint; For defining input/output function 1 Datum mpoint_in(PG_FUNCTION_ARGS) 2 { 3 4mpoint *result; 5char *pnt=(char *)malloc (sizeof (20)); 6char *ts=(ch

[GENERAL] Debug Contrib/cube code

2011-05-05 Thread Nick Raj
Hi, I am using postgresql-8.4.6. I want to debug the contrib/cube code. Can we able to debug that cube code? Because there is no .configure file to enable debug. Is there is any way to change make file to enable debug? Thanks Nick

Re: [GENERAL] Debug Contrib/cube code

2011-05-13 Thread Nick Raj
, 2011 at 6:42 AM, Joshua Tolley wrote: > On Fri, May 06, 2011 at 10:43:23AM +0530, Nick Raj wrote: > > Hi, > > I am using postgresql-8.4.6. I want to debug the contrib/cube code. Can > we > > able to debug that cube code? Because there is no .configure file to > > ena

[GENERAL] Toast datum

2011-05-16 Thread Nick Raj
Hi, #define DatumGetNDBOX(x)((NDBOX*)DatumGetPointer(x)) #define PG_GETARG_NDBOX(x)DatumGetNDBOX( PG_DETOAST_DATUM(PG_GETARG_DATUM(x)) ) Now i have to define #define NDBOXGetDatum(x) ()PointerGetDatum(x) Is there any need to replace this ?? with some toastable thing or is it suff

[GENERAL] arguments are not toastable

2011-05-16 Thread Nick Raj
Hi, I have defined some function and also used NDBOX structure that having variable length. typedef struct NDBOX { int32vl_len_;/* varlena length */ unsigned int dim; doublex[1]; } NDBOX; When i called my function, it gives NDBOX to be null On debugging, i foun

[GENERAL] disable seqscan

2011-05-23 Thread Nick Raj
Hi, I have build an index. When, i execute the query, it gives the result by sequential scan, not by using my index. I have already run vacuum analyze to collect some statistics regarding table. May be sequential scan is giving faster execution time than my indexing. But i want to know how much ti

Re: [GENERAL] disable seqscan

2011-05-23 Thread Nick Raj
On Mon, May 23, 2011 at 5:44 PM, Andreas Kretschmer < akretsch...@spamfence.net> wrote: > Andrew Sullivan wrote: > > > On Mon, May 23, 2011 at 05:31:04PM +0530, Nick Raj wrote: > > > Hi, > > > I have build an index. When, i execute the query, it gives the re

Re: [GENERAL] disable seqscan

2011-05-23 Thread Nick Raj
On Mon, May 23, 2011 at 7:35 PM, Tom Lane wrote: > Nick Raj writes: > >> Andrew Sullivan wrote: > >>> It sounds like your index can't actually be used to satisfy your > >>> query. Without seeing the table definition, index definition, and > >&g

[GENERAL] Index Size

2011-05-30 Thread Nick Raj
Hi, Cube code provided by postgres contrib folder. It uses the NDBOX structure. On creating index, it's size increase at a high rate. On inserting some tuple and creating indexes its behaviour is shown below. 1. When there is only one tuple select pg_size_pretty(pg_relation_ size('cubtest'))

Re: [GENERAL] Index Size

2011-05-30 Thread Nick Raj
On Tue, May 31, 2011 at 8:50 AM, Tom Lane wrote: > Craig Ringer writes: > > On 05/30/2011 08:53 PM, Nick Raj wrote: > >> Cube code provided by postgres contrib folder. It uses the NDBOX > structure. > >> On creating index, it's size increase at a high rate. &g

[GENERAL] Pl/pgsql function

2011-06-04 Thread Nick Raj
I am implementing some pl/pgsql functions. Is there any way to change the input for example- I got some value by $1. I want to modify this value (means split that value), Can we do this and how? Second thing, Suppose i defined a function test as select test('geom',the_geom,time) from tablename .

[GENERAL] Reg: Permission error in Windows psql while trying to read sql commands from file

2008-10-11 Thread Raj K
C:\Documents and Settings\All Users\Documents\DB\testdb.txt C:: Permission denied I have a lot of sql commands in the file, so it is difficult to type in the same everytime. If somebody can help me out on this, I would be much obliged. Thank you in advance, Regards, Raj

Re: [GENERAL] Reg: Permission error in Windows psql while trying to read sql commands from file

2008-10-11 Thread Raj K
\All Users\Documents\ - which I did. But even that did not help - as mentioned in the first mail. If you could help me on this I would be much obliged.. Regards Raj On Sat, Oct 11, 2008 at 11:11 PM, Raymond O'Donnell <[EMAIL PROTECTED]> wrote: > On 11/10/2008 18:38, Raj K wrote: >

Re: [GENERAL] Reg: Permission error in Windows psql while trying to read sql commands from file

2008-10-13 Thread Raj K
12, 2008 at 11:47 PM, Josh Williams <[EMAIL PROTECTED]> wrote: > On Sun, 2008-10-12 at 09:25 +0530, Raj K wrote: > > Since it is in windows - I could not find any specific file permission > > mechanisms similar to linux. (This is my first foray in windows - so I > > am a

[GENERAL] Reg: Custom Data Types in PostgreSQL

2008-11-21 Thread Raj K
reason for having the same. Other than ease of use, I couldnt find any. Could anyone help me out on the same? Regards Raj

[GENERAL] Error migrating from 7.4.3 to 8.0.3

2005-09-26 Thread Raj Gupta
relation. Has anyone seen this behavior before? Are we doing something wrong? Thanks Raj -- Raj Gupta                      [EMAIL PROTECTED] 1684 Nightingale Avenue     Suite 201 Sunnyvale, CA 94087        408-733-2737(fax) http://www.zeesource.net

Re: [GENERAL] Error migrating from 7.4.3 to 8.0.3

2005-09-26 Thread Raj Gupta
same index on that table. Otherwise, everything else seems to be okay. Raj On Sep 26, 2005, at 10:09 AM, Poul Møller Hansen wrote: Raj Gupta wrote: Hi, We are trying to migrate our database from 7.4.3 of Postgresql to 8.0.3. While migrating a table, we got the following error: ERROR: coul

Re: [GENERAL] Error migrating from 7.4.3 to 8.0.3

2005-09-26 Thread Raj Gupta
This is both while doing a pg_restore and also when doing a 'create index' command. This is running on Mac OS X 10.3 Postgresql 7.4 runs fine, and creates the index, so I would be surprised if this is a hardware error? Raj On Sep 26, 2005, at 10:23 AM, Vivek Khera wrote:

Re: [GENERAL] Error migrating from 7.4.3 to 8.0.3

2005-09-26 Thread Raj Gupta
This is a stock Mac OS 10.3 (Panther). Has anyone else seen this problem with 8.0.3 on Panther? According to the INSTALL file 10.3 should work fine, as reported by Andrew Rawnsley, cc'd on this message. Raj On Sep 26, 2005, at 12:23 PM, Tom Lane wrote: "Operation not permitted

[GENERAL] unsubscribe

2005-01-07 Thread Astha Raj
Unsubscribe -- Internal Virus Database is out-of-date. Checked by AVG Anti-Virus. Version: 7.0.296 / Virus Database: 265.5.0 - Release Date: 12/9/2004 <> ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [GENERAL] unsubscribe

2005-01-07 Thread Astha Raj
> Unsubscribe pgsql-general-owner and pgsql-general -- > > > -- Internal Virus Database is out-of-date. Checked by AVG Anti-Virus. Version: 7.0.296 / Virus Database: 265.5.0 - Release Date: 12/9/2004 <> ---(end of broadcast)--- TIP 6: Have you s

[GENERAL] unsubscribe

2005-01-07 Thread Astha Raj
What do I do to unsubscribe from this mailing list? -- Internal Virus Database is out-of-date. Checked by AVG Anti-Virus. Version: 7.0.296 / Virus Database: 265.5.0 - Release Date: 12/9/2004 ---(end of broadcast)--- TIP 8: explain analyze is y

[GENERAL] psql -E option is not working in 7.4.2 like 7.3.4

2004-05-20 Thread Durai raj
ow) Why it gives diffferent output from previous version? Regs, Raj. Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now http://uk.messenger.yahoo.com/do

[GENERAL] ODBC for PostgreSQL 7.4

2004-10-01 Thread Astha Raj
Hi All, I want to connect to PostgreSQL 7.4 from my Windows machine. What ODBC version is needed? Is there any other important settings required? I am very new to this database. Thanks, Astha ---(end of broadcast)--- TIP 2: you can get off all lis

[GENERAL] COALESCE not filtering well.

2009-07-06 Thread Mohan Raj B
G'Day! I have issues with filtering the data based on the criteria. Please take a look at the way I use COALESCE especially the WHERE part of my function. The function is not returning me a filtered result. for example, if I try to execute the function as follows: SELECT * FROM sp_item(10,NULL