Re: [GENERAL] data type troubles

2012-12-21 Thread Scott Marlowe
On Mon, Dec 17, 2012 at 2:38 PM, Kirk Wythers wrote: > > I seem to be dealing with a data type issue when I try and import data > into a new and empty database. > > Error Message: ERROR: date/time field value out of range: > "1332471600:00:00" > LINE 1: ...tc_avg25") values ('2012-03-22 21:00:00_

[GENERAL] data type troubles

2012-12-21 Thread Kirk Wythers
I seem to be dealing with a data type issue when I try and import data into a new and empty database. Error Message: ERROR: date/time field value out of range: "1332471600:00:00" LINE 1: ...tc_avg25") values ('2012-03-22 21:00:00_B4WARM_A','133247160… Here are the first two rows in the files I

Re: [GENERAL] data type - import problem

2012-12-18 Thread Steve Crawford
On 12/17/2012 05:46 PM, Adrian Klaver wrote: On 12/17/2012 05:30 PM, Kirk Wythers wrote: Thanks. Is there a way to use the float4 data type for a variable when empty records contain "NA", instead of nothing? As you can see below the variable "A_TC_AVG1" has the first record filled with "NA" sig

Re: [GENERAL] data type - import problem

2012-12-17 Thread Adrian Klaver
On 12/17/2012 05:30 PM, Kirk Wythers wrote: Thanks. Is there a way to use the float4 data type for a variable when empty records contain "NA", instead of nothing? As you can see below the variable "A_TC_AVG1" has the first record filled with "NA" signifying that the record is empty? Records that

Re: [GENERAL] data type - import problem

2012-12-17 Thread Kirk Wythers
Thanks. Is there a way to use the float4 data type for a variable when empty records contain "NA", instead of nothing? As you can see below the variable "A_TC_AVG1" has the first record filled with "NA" signifying that the record is empty? Records that contain values will have decimal values l

Re: [GENERAL] data type - import problem

2012-12-17 Thread Adrian Klaver
On 12/17/2012 01:53 PM, Kirk Wythers wrote: I seem to be dealing with a data type issue when I try and import data into a new and empty database. Error Message: ERROR: date/time field value out of range: "1332471600:00:00" LINE 1: ...tc_avg25") values ('2012-03-22 21:00:00_B4WARM_A','133247160

[GENERAL] data type - import problem

2012-12-17 Thread Kirk Wythers
I seem to be dealing with a data type issue when I try and import data into a new and empty database. Error Message: ERROR: date/time field value out of range: "1332471600:00:00" LINE 1: ...tc_avg25") values ('2012-03-22 21:00:00_B4WARM_A','133247160… Here are the first two rows in the files

Re: [GENERAL] Data Type for Money

2011-12-30 Thread Dann Corbit
AM To: PostgreSQL Subject: Re: [GENERAL] Data Type for Money On Fri, Dec 30, 2011 at 12:46 PM, Adrian Klaver wrote: > My guess is it is listed as numeric which is equivalent to decimal: > > http://www.postgresql.org/docs/9.1/interactive/datatype-numeric.html Thanks. I just for some reason

Re: [GENERAL] Data Type for Money

2011-12-30 Thread Tom Lane
Carlos Mennens writes: > Thanks. I just for some reason can't see or understand the difference > between 'decimal' & 'numeric'. Why have two data types for the same > values? Am I missing something? There isn't any difference, in Postgres. There are two type names because the SQL standard requir

Re: [GENERAL] Data Type for Money

2011-12-30 Thread Carlos Mennens
On Fri, Dec 30, 2011 at 12:46 PM, Adrian Klaver wrote: > My guess is it is listed as numeric which is equivalent to decimal: > > http://www.postgresql.org/docs/9.1/interactive/datatype-numeric.html Thanks. I just for some reason can't see or understand the difference between 'decimal' & 'numeric'

Re: [GENERAL] Data Type for Money

2011-12-30 Thread Adrian Klaver
On Friday, December 30, 2011 9:41:18 am Carlos Mennens wrote: > I'm trying to understand what is the recommended data type for $ in > PostgreSQL. I've done some research and from what I've gathered, there > are a few options: > > 1. decimal > 2. money > > I've read the 'money' data type is non-st

[GENERAL] Data Type for Money

2011-12-30 Thread Carlos Mennens
I'm trying to understand what is the recommended data type for $ in PostgreSQL. I've done some research and from what I've gathered, there are a few options: 1. decimal 2. money I've read the 'money' data type is non-standard and I should avoid using this. I see it a bunch of Microsoft SQL Server

Re: [GENERAL] data type

2011-03-03 Thread Willy-Bas Loos
On Thu, Mar 3, 2011 at 6:41 AM, Nick Raj wrote: > Which type of data type will be used in above function (in place of ?) > that can collect more than one row(20,000) ? > Maybe the id that those 20M records have in common? hth, WBL On Thu, Mar 3, 2011 at 6:41 AM, Nick Raj wrote: > Hi, >

[GENERAL] data type

2011-03-02 Thread Nick Raj
Hi, I am writing some function in postgres pl/sql. My function is of type St_ABC((select obj_geom from XYZ),(select boundary_geom from boundary)) I have table XYZ with 20,000 tuples and in boundary, i have only one geometry. In postgres, ST_intersects(obj_geom, boundary_geom) checks each obj_geom

Re: [GENERAL] data type to store a lot of text and tables of data

2010-03-25 Thread Karina Guardado
Thank you very much for your help and so soon answears. I will try using the solutions you suggest. best regards, karina On Wed, Mar 24, 2010 at 4:44 PM, Raymond O'Donnell wrote: > On 24/03/2010 22:39, Karina Guardado wrote: > > You know I need to design a table where some attributes have a d

Re: [GENERAL] data type to store a lot of text and tables of data

2010-03-24 Thread Raymond O'Donnell
On 24/03/2010 22:39, Karina Guardado wrote: > You know I need to design a table where some attributes have a data type > that allow me to store text mixed with tables and other information. I > use PHP code to get the information and store it in to the database so I > wonder if this is posible to

Re: [GENERAL] data type to store a lot of text and tables of data

2010-03-24 Thread Karina Guardado
You know I need to design a table where some attributes have a data type that allow me to store text mixed with tables and other information. I use PHP code to get the information and store it in to the database so I wonder if this is posible to do. I found in the link you provided me that If cha

Re: [GENERAL] data type to store a lot of text and tables of data

2010-03-24 Thread Raymond O'Donnell
On 24/03/2010 22:01, Karina Guardado wrote: > what should be the data type to store a file that can be xls, doc, pdf > for example. Sorry, I missed this bit - for binary files you can use the bytea type. Look under "Binary data types" in the docs. Ray. -- Raymond O'Donnell :: Galway :: Irelan

Re: [GENERAL] data type to store a lot of text and tables of data

2010-03-24 Thread Raymond O'Donnell
On 24/03/2010 22:01, Karina Guardado wrote: > for example something like the following : > > *Table 9-25. Date/Time Operators* > > Operator Example Result > + date '2001-09-28' + integer '7' date '2001-10-05' > + date '2001-09-28' + interval '1 hour' timestamp '2001-09-28 01:00:00'

Re: [GENERAL] data type to store a lot of text and tables of data

2010-03-24 Thread Karina Guardado
for example something like the following : *Table 9-25. Date/Time Operators* OperatorExampleResult + date '2001-09-28' + integer '7'date '2001-10-05' + date '2001-09-28' + interval '1 hour'timestamp '2001-09-28 01:00:00' + date '2001-09-28' + time '03:00'timestamp '2001-09-28 03:00:00' + interval

Re: [GENERAL] data type to store a lot of text and tables of data

2010-03-24 Thread Raymond O'Donnell
On 24/03/2010 21:48, Karina Guardado wrote: > Hi, > > Is there a special data type to use to store a lot of text and tables of > data in a column or attribute? For large amounts of text, just use the TEXT data type: http://www.postgresql.org/docs/8.4/static/datatype-character.html Not sure

Re: [GENERAL] data type to store a lot of text and tables of data

2010-03-24 Thread Szymon Guz
2010/3/24 Karina Guardado > Hi, > > Is there a special data type to use to store a lot of text and tables of > data in a column or attribute? > > thanks in advance, > > regards, > > karina > El Salvador, Centroamerica > Normally text can be stored in a type named "TEXT". Maybe there would be som

[GENERAL] data type to store a lot of text and tables of data

2010-03-24 Thread Karina Guardado
Hi, Is there a special data type to use to store a lot of text and tables of data in a column or attribute? thanks in advance, regards, karina El Salvador, Centroamerica

Re: [GENERAL] data type change on a view

2007-12-13 Thread Andreas Kretschmer
Tom Lane <[EMAIL PROTECTED]> schrieb: > Andreas Kretschmer <[EMAIL PROTECTED]> writes: > >> cast it to varchar(8): > > > As i said in a private mail to Scott (sorry): the suggested way don't > > work, at least with 8.1. Maybe this works better in more recent > > versions. > > Yes, it works a lot

Re: [GENERAL] data type change on a view

2007-12-12 Thread Tom Lane
Andreas Kretschmer <[EMAIL PROTECTED]> writes: >> cast it to varchar(8): > As i said in a private mail to Scott (sorry): the suggested way don't > work, at least with 8.1. Maybe this works better in more recent > versions. Yes, it works a lot better in 8.2: http://archives.postgresql.org/pgsql-co

Re: [GENERAL] data type change on a view

2007-12-12 Thread Andreas Kretschmer
Scott Marlowe <[EMAIL PROTECTED]> schrieb: > On Dec 12, 2007 12:11 PM, A. Kretschmer > <[EMAIL PROTECTED]> wrote: > > Hello @all, > > > > i have a question (rot really for myself, a member of ther german forum > > asks): > > > > i have two tables, contains a varchar(N)-column. Now i create a VIEW

Re: [GENERAL] data type change on a view

2007-12-12 Thread Scott Marlowe
On Dec 12, 2007 12:11 PM, A. Kretschmer <[EMAIL PROTECTED]> wrote: > Hello @all, > > i have a question (rot really for myself, a member of ther german forum > asks): > > i have two tables, contains a varchar(N)-column. Now i create a VIEW > based on this tables. The resulting view contains now a va

[GENERAL] data type change on a view

2007-12-12 Thread A. Kretschmer
Hello @all, i have a question (rot really for myself, a member of ther german forum asks): i have two tables, contains a varchar(N)-column. Now i create a VIEW based on this tables. The resulting view contains now a varchar without length. How can i prevent this? How can i force that the column i

Re: [GENERAL] Data type that corresponds to bigserial...

2006-01-18 Thread Larry Rosenman
Redefined Horizons wrote: > I'm a newbie running PostgreSQL 8.1 and pgAdmin 3 (Version 1.2.2) on > Debian Sarge. > > I want to set up a foriegn key in one of my tables. This foreign key > will reference the primary key of another table in the database. The > referrenced table uses the bigserial d

[GENERAL] Data type that corresponds to bigserial...

2006-01-18 Thread Redefined Horizons
I'm a newbie running PostgreSQL 8.1 and pgAdmin 3 (Version 1.2.2) on Debian Sarge. I want to set up a foriegn key in one of my tables. This foreign key will reference the primary key of another table in the database. The referrenced table uses the bigserial datatype to generate its keys. The Postg

Re: [GENERAL] Data type to store latitude and longitude

2005-07-14 Thread woodb
> Hi guys, > > Is there a data type to store data extracted from a > GPS? The only thing I need is store latitude and > longitude. > > Thanks in advance, > There are a few options, Using basic Postgresql: store the lats as +-90 & longs as 0-360 or +-180 numeric datatypes. create a numeric array

Re: [GENERAL] Data type to store latitude and longitude

2005-07-11 Thread Tom Lane
MaRCeLO PeReiRA <[EMAIL PROTECTED]> writes: > Is there a data type to store data extracted from a > GPS? The only thing I need is store latitude and > longitude. You might be interested in postgis http://www.postgis.org/ regards, tom lane ---(end o

[GENERAL] Data type to store latitude and longitude

2005-07-11 Thread MaRCeLO PeReiRA
Hi guys, Is there a data type to store data extracted from a GPS? The only thing I need is store latitude and longitude. Thanks in advance, Regards, Marcelo P Campinas/SP/Brazil ___ Yahoo! Acesso Grátis -

[GENERAL] Data type money. How to use?

2001-05-04 Thread Lark
Hi! What is the format of data type money? I tried 0.00 0,00 $0.00 ... and tied :) ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can

Re: [GENERAL] Data type for storing images?

2001-03-13 Thread David Wall
> I am not sure what your exact purpose is, but in doing a lot of web > work with pgsql, I usually just store the full path to the image in a > varchar field and fetch that right into the IMG SRC attribute when I > need to display the image. Why would a full path in a IMG tag work? Doesn't your

Re: [GENERAL] Data type for storing images?

2001-03-12 Thread Frank Joerdens
On Sun, Mar 11, 2001 at 08:48:21PM -0500, Tom Lane wrote: [ . . . ] > bytea is probably your best bet. The 8k limit is toast in 7.1, btw. Is that whay you named it TOAST, in order to be able to say that? :))) Regards, Frank ---(end of broadcast)-

Re: [GENERAL] Data type for storing images?

2001-03-11 Thread David Wall
> bytea is probably your best bet. The 8k limit is toast in 7.1, btw. If you're using JDBC, you may not be able to get bytea types to work. I was able to get the SQL type OID to work with JDBC's get/setBytes() methods. You may also want to use 7.1 since I believe it's large object support is im

Re: [GENERAL] Data type for storing images?

2001-03-11 Thread Tom Lane
<[EMAIL PROTECTED]> writes: > I would like to store some images in my Postgres database. These will > all be thumbnails, limited to 4k or 5k. I know that PG has an 8k row > limit, but this should be fine, because there's not much else in the > row. Which data type could I use to store them, and

[GENERAL] Data type for storing images?

2001-03-11 Thread drevil
I would like to store some images in my Postgres database. These will all be thumbnails, limited to 4k or 5k. I know that PG has an 8k row limit, but this should be fine, because there's not much else in the row. Which data type could I use to store them, and is there a performance cost for ha

[GENERAL] data type (datetime)

2000-09-20 Thread Danny
- Hello - I have looked for a data type which allows me to have (using a cliche example again) FlightDetail_Arrival whcih is like so 21:07:00 18:00 - When I type this in psql it changes my data type from datetime to "timestamp" - It gives me the following about I did a SELECT * FROM table - 21:

[GENERAL] Data type

2000-06-09 Thread Mihai Gheorghiu
A logical field (Yes/No) in MS Access was exported as bpchar in Postgres. I failed to find this data type in the User's Manual. Only bool is mentioned there. Please advise. Thanks, Mihai

Re: [GENERAL] Data type for serial during constraint?

2000-05-30 Thread Ed Loehr
> "Rob S." wrote: > > > > Question tho': I've specified a SERIAL primary key ("fooID") in some table > > ("t1"). From another table, I'd like to specify that primary key as a > > foreign key. I have to include a data type, but that will create another > > sequencer for that field, which I would

Re: [GENERAL] Data type for serial during constraint?

2000-05-30 Thread Joseph Shraibman
"Rob S." wrote: > > Hiya, > > I've never sent mail to a list before, so i hope i get it right =) > > Downloaded and installed Postgres today for Slackware, for the first time. > Kudos to the PG team; we still can't believe it went so well. We were up, > with JDBC access in about 20 minutes. O

Re: [GENERAL] Data Type...

2000-04-16 Thread John Henderson
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]> Date: Saturday, April 15, 2000 12:39 Subject: [GENERAL] Data Type... >I would like to know if postgresql contains the varbinary type, and if the >record length is still limited to 8kB. > >What are the plans to change it ? Postgresql 7.0 o

Re: [GENERAL] data type "serial"

1999-09-22 Thread Michael Simms
> > > > > > > So how do you store something in data type serial? > > > I've created the column but everytime I attempt to do an update I get > > > back the error message that I can't store a duplicate key. > > > > > > table_col_seq.last_value = 1 > > > increment = 1 > > > maxvalue = 2billion s

Re: [GENERAL] data type "serial"

1999-09-22 Thread Charles Tassell
If you have this table: create table testing ( id serial, datatext, md int ); You would use: insert into testing (data, md) values ('my_data', 12); insert into testing (data, md) values ('more data', 15); The key part is that you don't specify the serial f

Re: [GENERAL] data type "serial"

1999-09-22 Thread Teodor Cimpoesu
Michael wrote: > > > > > > > So how do you store something in data type serial? > > > I've created the column but everytime I attempt to do an update I get > > > back the error message that I can't store a duplicate key. > > > > > > table_col_seq.last_value = 1 > > > increment = 1 > > > maxvalue

Re: [GENERAL] data type "serial"

1999-09-22 Thread Michael
> > > > So how do you store something in data type serial? > > I've created the column but everytime I attempt to do an update I get > > back the error message that I can't store a duplicate key. > > > > table_col_seq.last_value = 1 > > increment = 1 > > maxvalue = 2billion something > > > > I

Re: [GENERAL] data type "serial"

1999-09-22 Thread Michael Simms
> > So how do you store something in data type serial? > I've created the column but everytime I attempt to do an update I get > back the error message that I can't store a duplicate key. > > table_col_seq.last_value = 1 > increment = 1 > maxvalue = 2billion something > > I've tried storing 1,

[GENERAL] data type "serial"

1999-09-22 Thread Michael
So how do you store something in data type serial? I've created the column but everytime I attempt to do an update I get back the error message that I can't store a duplicate key. table_col_seq.last_value = 1 increment = 1 maxvalue = 2billion something I've tried storing 1,2,some other number i

[GENERAL] Data type recommendation

1999-08-04 Thread Thomas Lim
According to the user guide, it is mentioned that TEXT data type is recommended over CHAR or VARCHAR. Does anyone know why? I thought the access time for TEXT is slower. Shouldn't CHAR be used for key fields? Is there some sort of overheads for CHAR or VARCHAR that TEXT is recommended? Hope th