[GENERAL] %TYPE

2007-08-22 Thread Ged
Checking out a bug in my code I find in my table definition: CREATE TABLE publications ( ... name character varying(60) NOT NULL, ... ); while in the function I use to populate the web page, which amalgamates info from several sources, I have: CREATE TYPE npc_page_details_type AS (

Re: [GENERAL] %TYPE

2007-08-22 Thread Michael Glaesemann
On Aug 22, 2007, at 21:42 , Ged wrote: I've been looking to see if postgresql allows type definitions like the ones I'm used to from Oracle, where I can say: CREATE TYPE npc_page_details_type AS ( ... instance_name instances.name%type, ... ); and it will pick up the current type o

Re: [GENERAL] %TYPE

2007-08-23 Thread Richard Huxton
Ged wrote: Ty for those comments. Hmm, I did try it out before posting of course, and I've just tried it again to make sure I hadn't boobed with a typo. It seems my ISP is running 8.0.8 and it's definitely not working on that. It *is* in the 8.0.13 documentation also though... So now I'm off to

Re: [GENERAL] %TYPE

2007-08-23 Thread Michael Glaesemann
On Aug 23, 2007, at 7:57 , Richard Huxton wrote: Ged wrote: Ty for those comments. Hmm, I did try it out before posting of course, and I've just tried it again to make sure I hadn't boobed with a typo. It seems my ISP is running 8.0.8 and it's definitely not working on that. It *is* in the

Re: [GENERAL] %TYPE

2007-08-23 Thread Michael Glaesemann
On Aug 24, 2007, at 1:32 , Richard Huxton wrote: It's a "forgot to cc:" issue - forgot to remind, I'm afraid. Thanks for checking, Richard. Was wondering if my email service was acting up again. Michael Glaesemann grzm seespotcode net ---(end of broadcast)--

Re: [GENERAL] %TYPE

2007-08-23 Thread Richard Huxton
Michael Glaesemann wrote: I don't seem to have received the message Richard's responding to. The archives seem to be missing a couple as well. http://archives.postgresql.org/pgsql-general/2007-08/threads.php#01346 Anyone else besides Richard catch these messages? Any idea where they may hav

[GENERAL] type int2vector

2006-02-13 Thread William Leite Araújo
Hi all,  Anyone has or knows a function to manipulate/work with int2vector type? Tank's-- William Leite Araújo

[GENERAL] Type checking

2006-05-16 Thread Don Y
Hi, I have several user defined types with particular restraints upon the data they represent. If I have crafted my foo_in() function to ensure that these constraints are always satisfied *before* allowing a datum into the database AND I have designed my casts to be similarly vigilant, is there

[GENERAL] type definitions

2004-03-15 Thread Alexander Cohen
Where in the postgres source code can i find the source that declares all the data types that postgres has? Where does it tell postfgres that these types exist ena d here are there functions? thanks -- Alexander Cohen http://www.toomuchspace.com (819) 348-9237 (819) 432-3443 ---

Re: [GENERAL] type int2vector

2006-02-13 Thread Tom Lane
=?ISO-8859-1?Q?William_Leite_Ara=FAjo?= <[EMAIL PROTECTED]> writes: > Anyone has or knows a function to manipulate/work with int2vector type= > ? Since 8.1 you can treat it as a regular int2 array. regards, tom lane ---(end of broadcast)--

Re: [GENERAL] Type checking

2006-05-16 Thread Tom Lane
Don Y <[EMAIL PROTECTED]> writes: > I.e., if I have a bunch of functions defined as taking an > argument of type "foo", is there any way the user can pass > a value to these functions WITHOUT it going through my > gatekeepers (foo_in(), foo_from_baz(), etc.)? No, not if foo is a separate type. Po

[GENERAL] type of field

2010-01-18 Thread Jean-Yves F. Barbier
Hi list, I've got to store many small videos; to make things simple (backup/restore, because users don't know very much about IT) I've choosen BYTEA + EXTERNAL, is it the right choice? JY -- Wait for that wisest of all counselors, Time. -- Pericles -- Sent via pgsql-general mailing list (pgsql

[GENERAL] type of b-tree

2006-07-23 Thread David Hoksza
Hi, could anybody tell me which variation of B-tree PostgreSQL uses, that it can handle more than one column? Some link would be great. Thanks, David Hoksza ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] type of field

2010-01-18 Thread Greg Stark
On Mon, Jan 18, 2010 at 8:24 PM, Jean-Yves F. Barbier <12u...@gmail.com> wrote: > I've got to store many small videos; to make things simple (backup/restore, > because users don't know very much about IT) I've choosen BYTEA + EXTERNAL, > is it the right choice? If you want to store them in the dat

Re: [GENERAL] type of field

2010-01-18 Thread Jean-Yves F. Barbier
Greg Stark a écrit : > On Mon, Jan 18, 2010 at 8:24 PM, Jean-Yves F. Barbier <12u...@gmail.com> > wrote: >> I've got to store many small videos; to make things simple (backup/restore, >> because users don't know very much about IT) I've choosen BYTEA + EXTERNAL, >> is it the right choice? > > If

[GENERAL] type cast in index

2009-06-09 Thread Linos
Hello, i have reading in the mailing list any messages where different people use this format to establish a functional index in a column using a type cast. CREATE INDEX fecha_creacion_ordtrab ON orden_trabajo_cabecera USING btree ((time_stamp_creacion::date)); but in my postgresql 8.3 vers

[GENERAL] type conversion date <-> timestamp

2004-05-17 Thread Ulrich Wisser
Hi, today I started to wonder about type conversion. I want to get all rows of a table dated between two given dates. Until now I use select * from mytable where to_date('20040115', 'MMDD') <= timestamp and timestamp <= to_date('20040215', MMDD') Does that query include the 15th January a

[GENERAL] TYPE TABLE OF NUMBER

2012-06-03 Thread utsav
we are doing mgration activity form oracle to postgresql 9.1 How to convert this type : ORACLE : CREATE OR REPLACE TYPE "NUMBER_ARRAY" IS TABLE OF NUMBER please let me know how we can achive this in postgresql My understanding POSTGRESQL : CREATE TYPE "NUMBER_ARRAY" AS (arr int); Appre

[GENERAL] Type cast text to int4

2007-09-07 Thread M. van Egmond
Hello everybody, Im having troubles overriding postgresql's default behaviour of throwing an error while trying to cast an empty string to int4. I would like to cast empty strings to a null integer value. I've tried this by creating my own domain: CREATE DOMAIN my_int AS integer; -- Then cr

[GENERAL] Type cast text to int4

2007-09-07 Thread M. van Egmond
Hello everybody, Im having troubles overriding postgresql's default behaviour of throwing an error while trying to cast an empty string to int4. I would like to cast empty strings to a null integer value. I've tried this by creating my own domain: CREATE DOMAIN my_int AS integer; -- Then create

Re: [GENERAL] type casting in 8.3

2008-02-11 Thread thefronny
On Feb 11, 3:15 am, "${spencer}" <[EMAIL PROTECTED]> wrote: > I just literally ran my first search of the day and got the same > error. > > i changed my query so that the integer was cast into text and then it > worked fine. > > [EMAIL PROTECTED] wrote: > > All, > > > I'm getting the following (new

Re: [GENERAL] type casting in 8.3

2008-02-12 Thread Alban Hertroys
On Feb 12, 2008, at 2:55 AM, [EMAIL PROTECTED] wrote: On Feb 11, 3:15 am, "${spencer}" <[EMAIL PROTECTED]> wrote: I just literally ran my first search of the day and got the same error. i changed my query so that the integer was cast into text and then it worked fine. [EMAIL PROTECTED] wrote:

Re: [GENERAL] type of b-tree

2006-07-23 Thread Tom Lane
David Hoksza <[EMAIL PROTECTED]> writes: > Hi, could anybody tell me which variation of B-tree PostgreSQL uses, that > it can handle more than one column? Plain old b+ tree ... we just treat the keys as compound, ie the "compare" operation compares columns until finding a difference. > Some link

Re: [GENERAL] type of b-tree

2006-07-23 Thread David Hoksza
OK, thanks. And I would like have one more question about B-tree index - how many records are usualy stored in one node (what's arity of the tree)? Thanks, David Hoksza 23. července 2006, 20:03:03, napsal jste: TL> David Hoksza <[EMAIL PROTECTED]> writes:

Re: [GENERAL] type cast in index

2009-06-09 Thread Chris Spotts
>CREATE INDEX fecha_creacion_ordtrab ON orden_trabajo_cabecera USING btree >((time_stamp_creacion::date)); > >but in my postgresql 8.3 version i get this error: > >ERROR: functions in index expression must be marked IMMUTABLE If your time_stamp_creacion is a timestamp with time

Re: [GENERAL] type cast in index

2009-06-09 Thread Alvaro Herrera
Linos escribió: > CREATE INDEX fecha_creacion_ordtrab ON orden_trabajo_cabecera USING btree > ((time_stamp_creacion::date)); > > but in my postgresql 8.3 version i get this error: > > ERROR: functions in index expression must be marked IMMUTABLE You can make it work by adding an AT TIME ZONE 'U

Re: [GENERAL] type cast in index

2009-06-09 Thread Tom Lane
"Chris Spotts" writes: >> CREATE INDEX fecha_creacion_ordtrab ON orden_trabajo_cabecera USING btree >> ((time_stamp_creacion::date)); >> >> but in my postgresql 8.3 version i get this error: >> >> ERROR: functions in index expression must be marked IMMUTABLE > If your time_stamp

Re: [GENERAL] type cast in index

2009-06-09 Thread Linos
Yes it seems you have reason Chris, i have been using 'timestamp with time zone' without need it because i have read in the mailing list was good practice because maybe one day you use the database in more timezones but i ever use the app in the same timezone so i will convert the column datatyp

[GENERAL] type bytea and large objects

2000-12-19 Thread Mateu Batle
Hi all, I'm pretty new in PostgreSQL and I have some problems and questions. I'll list them here, maybe someone can help me :) 1) I wanted to use a binary type. I've seen in some place a type called bytea which I can use, but I cannot use it as a primary key. Is that possible somehow or with ano

Re: [GENERAL] Type conversions and nulls

2004-05-11 Thread Tom Lane
Edmund Dengler <[EMAIL PROTECTED]> writes: > What I want is an '=' that compares nulls as equal (rather than as > not-equal, which is the normal case). IS DISTINCT FROM may help you here. It's a not-equals operator rather than an equals operator, but it does what you want. (Unless what you wante

Re: [GENERAL] TYPE TABLE OF NUMBER

2012-06-03 Thread Raghavendra
On Fri, Jun 1, 2012 at 9:18 PM, utsav wrote: > we are doing mgration activity form oracle to postgresql 9.1 > > How to convert this type : > > ORACLE : > > CREATE OR REPLACE TYPE "NUMBER_ARRAY" IS TABLE OF NUMBER > > please let me know how we can achive this in postgresql > > > My understanding

Re: [GENERAL] TYPE TABLE OF NUMBER

2012-06-04 Thread utsav
No.. in this we have to define domain and than used it . Our requirenment is like application pass the array of integer and that we have to use in PostgreSQL functions. -- View this message in context: http://postgresql.1045698.n5.nabble.com/TYPE-TABLE-OF-NUMBER-tp5710983p576.html Sent from t

Re: [GENERAL] TYPE TABLE OF NUMBER

2012-06-04 Thread Thomas Kellerer
utsav, 04.06.2012 07:00: No.. in this we have to define domain and than used it . Our requirenment is like application pass the array of integer and that we have to use in PostgreSQL functions. You can pass an array directly. There is no need to define an "array type" in PostgreSQL -- Sen

Re: [GENERAL] TYPE TABLE OF NUMBER

2012-06-05 Thread utsav
Hi thomas .. Thanks for your help . I have done that thing . ] It is working fine -- View this message in context: http://postgresql.1045698.n5.nabble.com/TYPE-TABLE-OF-NUMBER-tp5710983p5711247.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-ge

Re: [GENERAL] TYPE TABLE OF NUMBER

2012-06-05 Thread Igor Neyman
> -Original Message- > From: utsav [mailto:utsav.ps...@tcs.com] > Sent: Monday, June 04, 2012 1:00 AM > To: pgsql-general@postgresql.org > Subject: Re: TYPE TABLE OF NUMBER > > No.. in this we have to define domain and than used it . Our > requirenment is like application pass the array

Re: [GENERAL] Type cast text to int4

2007-09-07 Thread M. van Egmond
Could you please give me the correct syntax to create a basetype using pl/pgsql functions instead of external functions? Or is this impossible? Thanks. Martijn van Oosterhout schreef: On Fri, Sep 07, 2007 at 11:36:23AM +0200, M. van Egmond wrote: Hello everybody, Im having troubles overri

Re: [GENERAL] Type cast text to int4

2007-09-07 Thread Martijn van Oosterhout
On Fri, Sep 07, 2007 at 11:36:23AM +0200, M. van Egmond wrote: > Hello everybody, > > Im having troubles overriding postgresql's default behaviour of throwing > an error while trying to cast an empty string to int4. I would like to > cast empty strings to a null integer value. I've tried this by c

Re: [GENERAL] Type cast text to int4

2007-09-07 Thread Martijn van Oosterhout
On Fri, Sep 07, 2007 at 01:40:57PM +0200, M. van Egmond wrote: > Could you please give me the correct syntax to create a basetype using > pl/pgsql functions instead of external functions? > Or is this impossible? It's not possible. You need to be able to deal with raw C strings and internal datat

[GENERAL] Type of application that use PostgreSQL

2003-10-02 Thread My Internet
Hello, I am in the process to define if our product can use PostgreSQL. Do you know what type of application use PostgreSQL, and also what is the size of the database for these projects? Our application has a table with more than 30 rows. There are complexe query with many joins. And we mu

[GENERAL] Type casting text to Numeric - Query Error

2011-08-17 Thread Vikram A
Hi there, I have the following definitions, 1. CREATE TABLE Sampletemp ( Sampleid serial NOT NULL,  SampleText character varying(50), CONSTRAINT Sampletemp_id PRIMARY KEY (Sampleid)); 2. Insert into Sampletemp (SampleText) values ('Mr. Raja'),('Mr. Alex'),('1000'),('2500'),('555'); 3. select

Re: [GENERAL] Type of application that use PostgreSQL

2003-10-02 Thread Richard Huxton
On Thursday 02 October 2003 09:10, My Internet wrote: > Hello, > > I am in the process to define if our product can use PostgreSQL. > > Do you know what type of application use PostgreSQL, and also what is the > size of the database for these projects? Everything from small-business apps (which I

Re: [GENERAL] Type of application that use PostgreSQL

2003-10-03 Thread Tom Lane
Shridhar Daithankar <[EMAIL PROTECTED]> writes: > Peter Childs wrote: >>> Postgresql do have update logs in form of WAL. >> No it does not. WAL is Down-Date Logs not update logs. WAL will >> enable you to rewind to the beginning of all currently running >> transactions after a crash. Ie roll-bac

Re: [GENERAL] Type casting text to Numeric - Query Error

2011-08-17 Thread Pavel Stehule
Hello 2011/8/17 Vikram A : > Hi there, > I have the following definitions, > 1. CREATE TABLE Sampletemp ( Sampleid serial NOT NULL,  SampleText character > varying(50), CONSTRAINT Sampletemp_id PRIMARY KEY (Sampleid)); > 2. Insert into Sampletemp (SampleText) values ('Mr. Raja'),('Mr. > Alex'),('1

Re: [GENERAL] Type casting text to Numeric - Query Error

2011-08-17 Thread Raymond O'Donnell
On 17/08/2011 13:17, Vikram A wrote: > Hi there, > > I have the following definitions, > > 1. CREATE TABLE Sampletemp ( Sampleid serial NOT NULL, SampleText > character varying(50), CONSTRAINT Sampletemp_id PRIMARY KEY (Sampleid)); > > 2. Insert into Sampletemp (SampleText) values ('Mr. Raja'),

Re: [GENERAL] Type casting text to Numeric - Query Error

2011-08-17 Thread Vikram A
August 2011 6:00 PM Subject: Re: [GENERAL] Type casting text to Numeric - Query Error Hello 2011/8/17 Vikram A : > Hi there, > I have the following definitions, > 1. CREATE TABLE Sampletemp ( Sampleid serial NOT NULL,  SampleText character > varying(50), CONSTRAINT Sampletemp_id

[GENERAL] Type cast removal - proposed exceptions for xml,enum

2010-12-06 Thread Craig Ringer
Hi all I'm finding a few areas where PostgreSQL's refusal to implicitly cast from 'text' to another type is causing real problems, particularly when using the PgJDBC driver. I'd like to propose a couple of relaxations of the implicit cast rules for certain text-like types: - user-defined enums; a

[GENERAL] type creates broken view, which can't be deleted

1999-01-31 Thread Charles Hornberger
It looks like there's a bug that allows you to create views with columns of type unknown, and then prevents you from dropping the view/table. alpha_2=> \i brokenview CREATE VIEW article_contrib_info AS SELECT ac.article_id, p,firstname,-- TYPO HERE, USED COMMA

Re: [GENERAL] Type cast removal - proposed exceptions for xml,enum

2010-12-06 Thread Mike Christensen
On Mon, Dec 6, 2010 at 7:49 PM, Craig Ringer wrote: > Hi all > > I'm finding a few areas where PostgreSQL's refusal to implicitly cast > from 'text' to another type is causing real problems, particularly when > using the PgJDBC driver. I'd like to propose a couple of relaxations of > the implicit

Re: [GENERAL] Type cast removal - proposed exceptions for xml,enum

2010-12-06 Thread Tom Lane
Craig Ringer writes: > I'm finding a few areas where PostgreSQL's refusal to implicitly cast > from 'text' to another type is causing real problems, particularly when > using the PgJDBC driver. I'd like to propose a couple of relaxations of > the implicit cast rules for certain text-like types: >

Re: [GENERAL] Type cast removal - proposed exceptions for xml,enum

2010-12-07 Thread Peter Eisentraut
On tis, 2010-12-07 at 11:49 +0800, Craig Ringer wrote: > This is driving me nuts when working with PgJDBC via various ORM > layers (I know, I know, but they're life at this point) that would > work happily with these types if they were implicitly castable to/from > strings, but don't understand how

Re: online vs. hot backup (was Re: [GENERAL] Type of application

2003-10-04 Thread Network Administrator
Quoting Ron Johnson <[EMAIL PROTECTED]>: > On Fri, 2003-10-03 at 14:37, Network Administrator wrote: > > Quoting Ron Johnson <[EMAIL PROTECTED]>: > > > > > On Fri, 2003-10-03 at 13:32, Network Administrator wrote: > > > > Quoting Richard Huxton <[EMAIL PROTECTED]>: > > > > > > > > > On Thursday

Re: PITR (was Re: [GENERAL] Type of application that use PostgreSQL)

2003-10-06 Thread Shridhar Daithankar
Ron Johnson wrote: All that we basically need for PITR is to provide management code that lets old WAL segments get archived off to tape (or wherever) rather than deleted, plus some kind of control that lets the roll-forward process be stopped at the desired point-in-time rather than necessarily ru

[GENERAL] Type Name / Internal name returned by pg_catalog.format_type with/without prepended schema name?

2012-06-27 Thread Glyn Astill
Hi Guys, I was wondering if anyone could shed some light with type names returned by pg_catalog.format_type sometimes having the schema name prepended, and sometimes not? I'm calling it like format_type(pg_type.oid, NULL) . I'm using pg9.0, but I remember seeing this years ago on older version

Re: [GENERAL] Type Name / Internal name returned by pg_catalog.format_type with/without prepended schema name?

2012-06-27 Thread Tom Lane
Glyn Astill writes: > I was wondering if anyone could shed some light with type names returned by > pg_catalog.format_type sometimes having the schema name prepended, and > sometimes not? I'm calling it like format_type(pg_type.oid, NULL) . General case: the schema name is used if the type woul

Re: [GENERAL] Type Name / Internal name returned by pg_catalog.format_type with/without prepended schema name?

2012-06-27 Thread Glyn Astill
> > From: Tom Lane >To: Glyn Astill >Cc: "pgsql-general@postgresql.org" >Sent: Wednesday, 27 June 2012, 14:31 >Subject: Re: [GENERAL] Type Name / Internal name returned by >pg_catalog.format_type with/without prepended schem

Re: [GENERAL] Type Name / Internal name returned by pg_catalog.format_type with/without prepended schema name?

2012-06-27 Thread Tom Lane
Glyn Astill writes: >> From: Tom Lane >> General case: the schema name is used if the type wouldn't be found >> without it, according to your current search_path. > However none of that explains why one of the types is returned with the > schema name and the other is not, both are in the same s

[GENERAL] Type of value has a mismatch with column typeCouldn't store in viewimages_yn Column. Expected type is BitString.

2011-09-15 Thread Reena
Type of value has a mismatch with column typeCouldn't store in viewimages_yn Column. Expected type is BitString. Iam getting this error when iam using bit field and assinging to datatable.. The code is below. Dim sql As String = "select * from Users where UserName = @param1" Dim