On 05/08/17 16:58, Alexander Farber wrote:
Good evening,
with PostgreSQL 9.6.3 and JDBC 42.1.1.jre7 types can be casted when
calling a stored function:
final String sql = "SELECT words_buy_vip(?::text, ?::int,
?::text, ?::text, ?::float, ?::inet)";
try (Connection db = Dr
Good evening,
with PostgreSQL 9.6.3 and JDBC 42.1.1.jre7 types can be casted when calling
a stored function:
final String sql = "SELECT words_buy_vip(?::text, ?::int, ?::text,
?::text, ?::float, ?::inet)";
try (Connection db = DriverManager.getConnection(DATABASE_URL,
DATABASE_US
Hi Adrian,
On Fri, May 19, 2017 at 3:02 PM, Adrian Klaver
wrote:
> FYI, 9.3 is now up to 9.3.17:
> At some point, once you have gotten a handle on using Postgres, you should
> probably update. Read the Release Notes for each of the minor releases to
> see what has been fixed.
Ah, good to know! T
On 05/19/2017 01:57 PM, Micky Hulse wrote:
Wow, so many helpful replies already! Thanks everyone! I'm going to do
my best at answering questions … Starting from the first email reply.
:)
What version of Postgres, OS and how was it installed?
PostgreSQL 9.3.9 on i686-redhat-linux-gnu, compil
On Fri, May 19, 2017 at 2:43 PM, Paul Jungwirth wrote:
> On 05/19/2017 02:25 PM, Micky Hulse wrote:
>
>> Awesome, that worked!
>>
>> SET search_path TO myschema, public;
>>
>> Thanks to everyone for the help! I really appreciate it. :)
>>
>
> Glad you figured it out! Setting the seach_path is
On 05/19/2017 02:25 PM, Micky Hulse wrote:
Awesome, that worked!
SET search_path TO myschema, public;
Thanks to everyone for the help! I really appreciate it. :)
Glad you figured it out! Setting the seach_path is often a good thing to
put in your ~/.psqlrc so you don't run into the same
On Fri, May 19, 2017 at 2:09 PM, Micky Hulse wrote:
>> If you find that the type isn't in the public schema, try setting your
>> schema search path so that the function can locate it, e.g.:
>> SET search_path TO foo, public;
Awesome, that worked!
SET search_path TO myschema, public;
Thanks
On Fri, May 19, 2017 at 2:09 PM, Micky Hulse wrote:
> Cool! Dumb question, but is foo the schema or the type?
Doh! I see now that foo is the schema! Thanks again Paul!
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgre
On Fri, May 19, 2017 at 1:31 PM, David G. Johnston
wrote:
> Short answer here is that whomever is calling that function needs to ensure
> that their search_path is setup so that the type can be found somewhere in
> it. Your desire for obscurity means you are pretty much on the hook for
> figuring
Hello and thanks for the help!
On Fri, May 19, 2017 at 1:25 PM, Paul Jungwirth
wrote:
> It sounds like the type might be in a different schema. You can say \dn to
> see the schemas in your database, and \dT+ will show the types along with
> their schema. You could also do \dT+ foo.* to see all th
Wow, so many helpful replies already! Thanks everyone! I'm going to do
my best at answering questions … Starting from the first email reply.
:)
On Fri, May 19, 2017 at 1:20 PM, Adrian Klaver
wrote:
>> sudo -i -u username
> You should not need to do above.
>> psql -U otherusername -d database
> Ju
On Fri, May 19, 2017 at 1:06 PM, Micky Hulse wrote:
Short answer here is that whomever is calling that function needs to
ensure that their search_path is setup so that the type can be found
somewhere in it. Your desire for obscurity means you are pretty much on
the hook for figuring out the rig
On 05/19/2017 01:06 PM, Micky Hulse wrote:
ERROR: type "xxx_xxx_x" does not exist
LINE 1: DECLARE results xxx_xxx_x;
It sounds like the type might be in a different schema. You can say \dn
to see the schemas in your database, and \dT+ will show the types along
with their schema. You
On 05/19/2017 01:06 PM, Micky Hulse wrote:
Hello,
I hope this is the right list for me to ask questions about psql.
Please let me know if I am in the wrong place. :)
I am far from an advanced user of PostgreSQL, so please bear with me ...
I am working with an inherited database/codebase. I am
Hello,
I hope this is the right list for me to ask questions about psql.
Please let me know if I am in the wrong place. :)
I am far from an advanced user of PostgreSQL, so please bear with me ...
I am working with an inherited database/codebase. I am trying to call
this function via psql:
# SEL
Hi,
I have here a question concerning how ACLs are handled for Types.
For Tables, when Ownership changes, Grantor info is also changed; hence
changing Ownership and Grants does not lead to the same privilege but from
different Grantors.
For Types though, you can easily end up with an ACL like {use
David Johnston writes:
> James Harper wrote
>> So suppose I wanted to implement myvarchar in C. In my _in function, how
>> do I know how big my column declaration is? Eg if someone tries to insert
>> 50 characters into my 42 character field, how do I get the declared length
>> and then tell postgr
James Harper wrote
>>
>> You probably should define your domain like this:
>>
>>CREATE DOMAIN myvarchar varchar(42);
>>
>
> That's what I thought, so it won't do what I want. I need to be able to
> set the length at the time of declaration.
>
> So suppose I wanted to implement myvarchar in
>
> You probably should define your domain like this:
>
>CREATE DOMAIN myvarchar varchar(42);
>
That's what I thought, so it won't do what I want. I need to be able to set the
length at the time of declaration.
So suppose I wanted to implement myvarchar in C. In my _in function, how do I
You probably should define your domain like this:
CREATE DOMAIN myvarchar varchar(42);
Best regards,
Behrang
http://www.behrang.org
On Sat, Feb 15, 2014 at 6:23 PM, James Harper wrote:
> I can create an alias of a type like:
>
> CREATE DOMAIN myvarchar varchar;
>
> But I can't declare a my
I can create an alias of a type like:
CREATE DOMAIN myvarchar varchar;
But I can't declare a myvarchar with a variable size, eg "mycolumn
myvarchar(42)" and from what I've read this is the way it DOMAIN is supposed to
work so I can't do it that way.
Is there a way to define myvarchar the way I
On Wed, Jul 31, 2013 at 11:09:22AM +0200, Marc Dahn wrote:
> Dear list,
>
> Section 9.8 of the postgres (9.1) documentation says, on the
> patterns for to_char(timestamp, pattern),:
>
> J Julian Day (days since November 24, 4714 BC at midnight)
>
> This leaves open the question of what's act
Dear list,
Section 9.8 of the postgres (9.1) documentation says, on the
patterns for to_char(timestamp, pattern),:
J Julian Day (days since November 24, 4714 BC at midnight)
This leaves open the question of what's actually returned. At least
in astronomy, it is customary to have fractiona
On Jun 21, 2013, at 19:21, Natalie Wenz wrote:
> Hi all!
>
> I am working on migrating data in a very large database (22TB +) between two
> existing tables that use type text for almost every field, to two new tables
> that use native data type for dates, integers, etc.
>
> The way I'm doing
Hi all!
I am working on migrating data in a very large database (22TB +) between two
existing tables that use type text for almost every field, to two new tables
that use native data type for dates, integers, etc.
The way I'm doing this is running a series of "Insert into new_table values
(stu
Arun P.L wrote:
> Hi All,
>
> We are doing a postgresql upgrade from version 7.4.30 to 9.2. While testing
> the
> queries in newer version, the following error is obtained for some of the
> queries which were working fine in older version.
>
>
> "ERROR: operator does not exist: character var
On 18 June 2013 14:38, Arun P.L wrote:
>
> Hi All,
>
> We are doing a postgresql upgrade from version 7.4.30 to 9.2. While
> testing the queries in newer version, the following error is obtained for
> some of the queries which were working fine in older version.
>
> *
>
> "ERROR: operator does n
Hi All,
We are doing a postgresql upgrade from version 7.4.30 to 9.2. While testing the
queries in newer version, the following error is obtained for some of the
queries which were working fine in older version.
"ERROR: operator does not exist: character varying = integer.HINT: No
operator
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
>
> 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
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
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
> -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
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
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
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
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
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
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
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
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'),
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
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
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
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:
>
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
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
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
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
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
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
"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
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
>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
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
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:
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
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
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
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
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
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
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)--
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
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
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
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
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
(
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:
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
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
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
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
=?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)--
Hi all, Anyone has or knows a function to manipulate/work with int2vector type? Tank's-- William Leite Araújo
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
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
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
---
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
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
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
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
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
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
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
85 matches
Mail list logo